From test at mail.kapitalizm.org Fri Oct 17 20:13:04 2008 From: test at mail.kapitalizm.org (Martin) Date: Fri Oct 17 20:33:42 2008 Subject: Via C7 encryption performance Message-ID: Good day :) I am planning to make local secure fileserver (everything encrypted with AES-256). I want it to be low power consumption and quiet device. Motherboards with VIA C-7 CPU which has hardware acceleration for AES encryption looks very intresting. Could you tell me guys approx transfer rate from and to harddisk (SATA) when using geli-encrypted filesystems with padlock boost ? I am planning to buy Jetway J7F21G5D board and add gigabit ethernet to it. It has 1,5 GHZ Via C7, FSB 133, 1 GB of DDR2 533 DIMM. How fast in encryption it will be ? I am planning to connect two SATA disks to it and use RAID1 on it. Thanks for reply, Martin From ssanders at opnet.com Thu Oct 23 15:43:11 2008 From: ssanders at opnet.com (Stephen Sanders) Date: Thu Oct 23 15:43:18 2008 Subject: Disk Throughput test Message-ID: <490097CC.9010802@opnet.com> FreeBSD 6.3 Dual Quad Core Xeon 5450@3Ghz 16GB RAM 3Ware 9650SE-ML / 256MB cache 14 Seagate 750GB/7200RPM/ST375033ONS SATA drives We have an application that is streaming data to disk at the maximum rate the controller can sustain. The controller should be able to develop something on the order of 600MB/s but we're only getting 450MB/s. The application writes about 50GB into a file, closes the file, and then starts another file. I've set all of the recommended settings from 3ware. I have tried various settings for vfs.hirunningspace - various settings include everything from 5MB to the cache size of the card (256MB). Does anyone know if there is some file system performance limit? Thanks From cswiger at mac.com Thu Oct 23 18:00:22 2008 From: cswiger at mac.com (Chuck Swiger) Date: Thu Oct 23 18:00:28 2008 Subject: Disk Throughput test In-Reply-To: <4900B94B.5000108@softhammer.net> References: <490097CC.9010802@opnet.com> <4900B94B.5000108@softhammer.net> Message-ID: On Oct 23, 2008, at 10:50 AM, Stephen Sanders wrote: > Good point about the RAID. It is set for RAID 5 as the data is > supposed > to be protected. RAID-10 provides somewhat better data protection, but less available space and better write performance especially for small writes. (For big writes, RAID-5 can do OK also, but small writes tend to really degrade RAID-5 performance, down to an order of magnitude *less* throughput compared with a single raw drive.) > Interestingly enough, diskinfo is telling me that the drive throughput > is 175MB/s. I'm guessing that this means diskinfo is a mixture of > reads > and writes? No, it should only be doing reads. For best-case read performance, it's likely to be at or near: dd if=_your_disks_ of=/dev/null bs=_raid_stripe_size_ ...or adjust bs up or down by factors of 2 and benchmark. Regards, -- -Chuck From ssanders at softhammer.net Thu Oct 23 18:11:41 2008 From: ssanders at softhammer.net (Stephen Sanders) Date: Thu Oct 23 18:11:48 2008 Subject: Disk Throughput test In-Reply-To: References: <490097CC.9010802@opnet.com> Message-ID: <4900B94B.5000108@softhammer.net> Good point about the RAID. It is set for RAID 5 as the data is supposed to be protected. Interestingly enough, diskinfo is telling me that the drive throughput is 175MB/s. I'm guessing that this means diskinfo is a mixture of reads and writes? Thanks Chuck Swiger wrote: > On Oct 23, 2008, at 8:27 AM, Stephen Sanders wrote: >> We have an application that is streaming data to disk at the maximum >> rate the controller can sustain. The controller should be able to >> develop something on the order of 600MB/s but we're only getting >> 450MB/s. > > Are you using RAID-5 or RAID-10 config? RAID-5 is best suited for > read-only or read-mostly volumes; if you are doing an even mix > RAID-1/10 will generally perform better. > >> The application writes about 50GB into a file, closes the file, and then >> starts another file. >> >> I've set all of the recommended settings from 3ware. I have tried >> various settings for vfs.hirunningspace - various settings include >> everything from 5MB to the cache size of the card (256MB). >> >> Does anyone know if there is some file system performance limit? > > You can also try running diskinfo -t to look for raw performance > numbers; if they are much different from the bandwidth your app is > getting, perhaps you need to tune your app... > > Regards, From cswiger at mac.com Thu Oct 23 18:13:57 2008 From: cswiger at mac.com (Chuck Swiger) Date: Thu Oct 23 18:14:02 2008 Subject: Disk Throughput test In-Reply-To: <490097CC.9010802@opnet.com> References: <490097CC.9010802@opnet.com> Message-ID: On Oct 23, 2008, at 8:27 AM, Stephen Sanders wrote: > We have an application that is streaming data to disk at the maximum > rate the controller can sustain. The controller should be able to > develop something on the order of 600MB/s but we're only getting > 450MB/s. Are you using RAID-5 or RAID-10 config? RAID-5 is best suited for read-only or read-mostly volumes; if you are doing an even mix RAID-1/10 will generally perform better. > The application writes about 50GB into a file, closes the file, and > then > starts another file. > > I've set all of the recommended settings from 3ware. I have tried > various settings for vfs.hirunningspace - various settings include > everything from 5MB to the cache size of the card (256MB). > > Does anyone know if there is some file system performance limit? You can also try running diskinfo -t to look for raw performance numbers; if they are much different from the bandwidth your app is getting, perhaps you need to tune your app... Regards, -- -Chuck From jpaetzel at FreeBSD.org Thu Oct 23 18:16:07 2008 From: jpaetzel at FreeBSD.org (Josh Paetzel) Date: Thu Oct 23 18:24:40 2008 Subject: Disk Throughput test In-Reply-To: <490097CC.9010802@opnet.com> References: <490097CC.9010802@opnet.com> Message-ID: <4900BAF7.8040101@FreeBSD.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stephen Sanders wrote: > FreeBSD 6.3 > Dual Quad Core Xeon 5450@3Ghz > 16GB RAM > 3Ware 9650SE-ML / 256MB cache > 14 Seagate 750GB/7200RPM/ST375033ONS SATA drives > > We have an application that is streaming data to disk at the maximum > rate the controller can sustain. The controller should be able to > develop something on the order of 600MB/s but we're only getting 450MB/s. > > The application writes about 50GB into a file, closes the file, and then > starts another file. > > I've set all of the recommended settings from 3ware. I have tried > various settings for vfs.hirunningspace - various settings include > everything from 5MB to the cache size of the card (256MB). > > Does anyone know if there is some file system performance limit? > > Thanks > 3ware has recently released new firmware for the 9650 and 9690 cards that makes a huge difference in performance. I've noticed anywhere from 10-25% increases in real world disk I/O performance. There is no "file system performance limit" that magically caps sequential read/write speed to some arbitrary value. A lot of factors come together to give you a max speed. Obviously you are hitting a bottleneck somewhere that is lower than you think it should be. Does 3ware advertise the card is capable of 600 Megs/sec? It seems an 8x pci-e card would be capable of higher performance than that. - -- Thanks, Josh Paetzel PGP: 8A48 EF36 5E9F 4EDA 5ABC 11B4 26F9 01F1 27AF AECB -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFJALr3JvkB8SevrssRAqleAJ9oJCRkv9jOVwxCqYDlfaSj+blweACdFsBP TUEcv2yhQ3CBk/tLC5JmyJs= =h/mH -----END PGP SIGNATURE----- From mike at sentex.net Thu Oct 23 19:47:36 2008 From: mike at sentex.net (Mike Tancsa) Date: Thu Oct 23 19:47:43 2008 Subject: improving Samba performance Message-ID: <200810231859.m9NIx2NV059442@lava.sentex.ca> Are there any suggestions for a AMD64 RELENG_7 box to improve samba performance ? Write throughput from a windows box seems a bit slower than it should be. ---Mike -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike From ivoras at freebsd.org Thu Oct 23 21:08:12 2008 From: ivoras at freebsd.org (Ivan Voras) Date: Thu Oct 23 21:08:19 2008 Subject: Disk Throughput test In-Reply-To: <490097CC.9010802@opnet.com> References: <490097CC.9010802@opnet.com> Message-ID: Stephen Sanders wrote: > FreeBSD 6.3 > Dual Quad Core Xeon 5450@3Ghz FreeBSD 6.3 isn't very suited for your CPU. If your workload isn't completely CPU bound (i.e. if isn't Seti@Home), you will not only not make use of all 8 CPU cores but will probably get worse performance with 8 CPUs than with 2 CPUs. Upgrade to at least 7.0 and you'll probably need 7.1-BETA2 to maximally use your CPU. But if you don't have much IO contention it's probably not related to your problem. > 16GB RAM You're using the AMD64 version, right? > 3Ware 9650SE-ML / 256MB cache > 14 Seagate 750GB/7200RPM/ST375033ONS SATA drives Which RAID mode? What is the total size of your array? > We have an application that is streaming data to disk at the maximum > rate the controller can sustain. The controller should be able to > develop something on the order of 600MB/s but we're only getting 450MB/s. Can you use something like bonnie++ to test your configuration? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 258 bytes Desc: OpenPGP digital signature Url : http://lists.freebsd.org/pipermail/freebsd-performance/attachments/20081023/4bcc4c4b/signature.pgp From ssanders at softhammer.net Thu Oct 23 22:32:30 2008 From: ssanders at softhammer.net (Stephen Sanders) Date: Thu Oct 23 22:32:36 2008 Subject: Disk Throughput test In-Reply-To: References: <490097CC.9010802@opnet.com> Message-ID: <1224799319.3229.5.camel@pepin.softhammer.net> Good point. I plan to switch to 7.0, though the system is running the ULE scheduler. The cpu's are amd64. I tested early on with bonnie++ and was getting similar numbers to the application test. It's a good idea to try it again so I will. The RAID is a RAID 6 as the application calls for data integrity though I do plan on doing a RAID 0 test as well. The array is something like 7TB total. Thanks. On Thu, 2008-10-23 at 22:16 +0200, Ivan Voras wrote: > Stephen Sanders wrote: > > FreeBSD 6.3 > > Dual Quad Core Xeon 5450@3Ghz > > FreeBSD 6.3 isn't very suited for your CPU. If your workload isn't > completely CPU bound (i.e. if isn't Seti@Home), you will not only not > make use of all 8 CPU cores but will probably get worse performance with > 8 CPUs than with 2 CPUs. Upgrade to at least 7.0 and you'll probably > need 7.1-BETA2 to maximally use your CPU. > > But if you don't have much IO contention it's probably not related to > your problem. > > > 16GB RAM > > You're using the AMD64 version, right? > > > 3Ware 9650SE-ML / 256MB cache > > 14 Seagate 750GB/7200RPM/ST375033ONS SATA drives > > Which RAID mode? What is the total size of your array? > > > We have an application that is streaming data to disk at the maximum > > rate the controller can sustain. The controller should be able to > > develop something on the order of 600MB/s but we're only getting 450MB/s. > > Can you use something like bonnie++ to test your configuration? > From 7yuny1 at gmail.com Sat Oct 25 19:25:50 2008 From: 7yuny1 at gmail.com (Jyun-Yi Liou) Date: Sat Oct 25 19:25:57 2008 Subject: improving Samba performance In-Reply-To: <200810231859.m9NIx2NV059442@lava.sentex.ca> References: <200810231859.m9NIx2NV059442@lava.sentex.ca> Message-ID: <81a9e3840810251202s3ed27472y46da61999166d9c0@mail.gmail.com> hi Mike, In my experience, you should set "use sendfile = yes" and "socket options = SO_RCVBUF=8192 SO_SNDBUF=8192 TCP_NODELAY" in /usr/local/etc/smb.conf expecially sendfile system call and TCP_NODELAY, these will let your samba transmits file or response faster. please read smb.conf(5) and sendfile(2) for more information Regards, jyuny1 2008/10/24 Mike Tancsa > Are there any suggestions for a AMD64 RELENG_7 box to improve samba > performance ? Write throughput from a windows box seems a bit slower than it > should be. > > ---Mike > > -------------------------------------------------------------------- > Mike Tancsa, tel +1 519 651 3400 > Sentex Communications, mike@sentex.net > Providing Internet since 1994 www.sentex.net > Cambridge, Ontario Canada www.sentex.net/mike > > _______________________________________________ > freebsd-performance@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > To unsubscribe, send any mail to " > freebsd-performance-unsubscribe@freebsd.org" > From krassi at bulinfo.net Wed Oct 29 15:55:30 2008 From: krassi at bulinfo.net (Krassimir Slavchev) Date: Wed Oct 29 16:00:31 2008 Subject: thread switching time? Message-ID: <49088124.9050809@bulinfo.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello All, I am using FreeBSD 7 and would like to decrease the time of switching between threads. This time seems to be 1ms and it is impossible to make lower delays inside a thread, at least using nanosleep(). Is it possible to decrease this time to 1us? Best Regards -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFJCIEkxJBWvpalMpkRAmKUAKCehUxakt83IvQ/QhW2n0BicWaQbQCeJW9z twONH5Eb9fA4JoQaYVk69os= =6xti -----END PGP SIGNATURE----- From freebsd-performance at dfmm.org Wed Oct 29 18:06:01 2008 From: freebsd-performance at dfmm.org (Jason Stone) Date: Wed Oct 29 18:06:16 2008 Subject: thread switching time? In-Reply-To: <49088124.9050809@bulinfo.net> References: <49088124.9050809@bulinfo.net> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > I am using FreeBSD 7 and would like to decrease the time of switching > between threads. This time seems to be 1ms and it is impossible to make > lower delays inside a thread, at least using nanosleep(). > > Is it possible to decrease this time to 1us? Increase HZ, with the usual caveats about trading off latency for overhead? -Jason -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: See https://private.idealab.com/public/jason/jason.gpg iD8DBQFJCJ/FswXMWWtptckRAsdSAKCu2TF1LaqyR0JTuZX3oZD8S3H+cQCg8xoa 78qzo/mZ9klKhotTn4kJTkw= =6fXj -----END PGP SIGNATURE----- From krassi at bulinfo.net Thu Oct 30 07:34:28 2008 From: krassi at bulinfo.net (Krassimir Slavchev) Date: Thu Oct 30 11:22:17 2008 Subject: thread switching time? In-Reply-To: References: <49088124.9050809@bulinfo.net> Message-ID: <4909637E.3030802@bulinfo.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jason Stone wrote: > >> I am using FreeBSD 7 and would like to decrease the time of switching >> between threads. This time seems to be 1ms and it is impossible to >> make lower delays inside a thread, at least using nanosleep(). > >> Is it possible to decrease this time to 1us? > > Increase HZ, with the usual caveats about trading off latency for overhead? > > > -Jason > I have: kern.clockrate: { hz = 4000, tick = 250, profhz = 4000, stathz = 129 } but no difference. Yes, overheads are lower and my application's performance is better but thread switching time is same. AFAIR I have read somewhere on the Internet about such problem when playing multiple video files and the solution was to change some parameters somewhere in header files but I cannot find this again. Best Regards -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFJCWN+xJBWvpalMpkRAt+qAKCjoLVyUZdbf91nqrgSj0nOhiGOhQCfYaqv IijZrwPCRYJmBUGHb2WI9IA= =uv12 -----END PGP SIGNATURE----- From xiazhongqi at huawei.com Thu Oct 30 21:04:38 2008 From: xiazhongqi at huawei.com (Sam Xia) Date: Thu Oct 30 21:04:46 2008 Subject: 1. thread switching time? (Krassimir Slavchev) In-Reply-To: <20081030120020.838891065756@hub.freebsd.org> Message-ID: <000001c93b0c$6195e6b0$2f096f0a@china.huawei.com> hi krassi, what kind of hardware are you using? Actually because of process/thread scheduling mechanism, timing granulariy is coarse in FreeBSD(more than 10 ms) S.X > -----Original Message----- > From: owner-freebsd-performance@freebsd.org > [mailto:owner-freebsd-performance@freebsd.org] On Behalf Of > freebsd-performance-request@freebsd.org > Sent: Thursday, October 30, 2008 8:00 PM > To: freebsd-performance@freebsd.org > Subject: freebsd-performance Digest, Vol 68, Issue 4 > > Message: 1 > Date: Wed, 29 Oct 2008 17:28:36 +0200 > From: Krassimir Slavchev > Subject: thread switching time? > To: freebsd-performance@freebsd.org > Message-ID: <49088124.9050809@bulinfo.net> > Content-Type: text/plain; charset=ISO-8859-1 > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello All, > > I am using FreeBSD 7 and would like to decrease the time of > switching between threads. This time seems to be 1ms and it > is impossible to make lower delays inside a thread, at least > using nanosleep(). > > Is it possible to decrease this time to 1us? > > > Best Regards > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (FreeBSD) > > iD8DBQFJCIEkxJBWvpalMpkRAmKUAKCehUxakt83IvQ/QhW2n0BicWaQbQCeJW9z > twONH5Eb9fA4JoQaYVk69os= > =6xti > -----END PGP SIGNATURE----- > > > ************************************************** > From xiazhongqi at huawei.com Thu Oct 30 21:08:06 2008 From: xiazhongqi at huawei.com (Sam Xia) Date: Thu Oct 30 21:54:10 2008 Subject: freebsd-performance Digest, Vol 68, Issue 4 In-Reply-To: <20081030120020.838891065756@hub.freebsd.org> Message-ID: <000101c93b0c$cb3a6d20$2f096f0a@china.huawei.com> hi all, Someone had ever told me that select-based timing thread is more accurate than signal-based timer. But I don't know the real reason. Anyone could give me some tips? Best Regards, Sam Xia From krassi at bulinfo.net Fri Oct 31 00:32:13 2008 From: krassi at bulinfo.net (Krassimir Slavchev) Date: Fri Oct 31 00:32:20 2008 Subject: 1. thread switching time? (Krassimir Slavchev) In-Reply-To: <000001c93b0c$6195e6b0$2f096f0a@china.huawei.com> References: <000001c93b0c$6195e6b0$2f096f0a@china.huawei.com> Message-ID: <490AB477.2080001@bulinfo.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Sam Xia wrote: > hi krassi, > > what kind of hardware are you using? Actually because of process/thread > scheduling mechanism, timing granulariy is coarse in FreeBSD(more than 10 > ms) dmesg: ... CPU: Intel(R) Core(TM)2 CPU E8400 @ 3.00GHz (3005.25-MHz 686-class CPU) ... Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 acpi_hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 900 ... The hardware is fast enough! Also, I am able to set HZ=100000 but the thread switching time is still ~1ms. Best Regards > > S.X >> -----Original Message----- >> From: owner-freebsd-performance@freebsd.org >> [mailto:owner-freebsd-performance@freebsd.org] On Behalf Of >> freebsd-performance-request@freebsd.org >> Sent: Thursday, October 30, 2008 8:00 PM >> To: freebsd-performance@freebsd.org >> Subject: freebsd-performance Digest, Vol 68, Issue 4 > >> Message: 1 >> Date: Wed, 29 Oct 2008 17:28:36 +0200 >> From: Krassimir Slavchev >> Subject: thread switching time? >> To: freebsd-performance@freebsd.org >> Message-ID: <49088124.9050809@bulinfo.net> >> Content-Type: text/plain; charset=ISO-8859-1 >> > Hello All, > > I am using FreeBSD 7 and would like to decrease the time of > switching between threads. This time seems to be 1ms and it > is impossible to make lower delays inside a thread, at least > using nanosleep(). > > Is it possible to decrease this time to 1us? > > > Best Regards >> >> ************************************************** >> > _______________________________________________ > freebsd-performance@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFJCrR3xJBWvpalMpkRAq8aAJ9F/n9mX94h46Rb4kHOBo9kDMUjzQCgmcZQ Yuum1rMnhaKICE+FKC6n294= =y2hp -----END PGP SIGNATURE----- From julian at elischer.org Fri Oct 31 01:13:00 2008 From: julian at elischer.org (Julian Elischer) Date: Fri Oct 31 01:13:06 2008 Subject: 1. thread switching time? (Krassimir Slavchev) In-Reply-To: <490AB477.2080001@bulinfo.net> References: <000001c93b0c$6195e6b0$2f096f0a@china.huawei.com> <490AB477.2080001@bulinfo.net> Message-ID: <490AB750.9040505@elischer.org> Krassimir Slavchev wrote: > > Also, I am able to set HZ=100000 but the thread switching time is still > ~1ms. You must be talking about the time that a thread can run before it is pushed out by other threads? I know I've seem many x 10,000 context switches in some cases, i.e. look at very high interrupt rates etc. so I guess I'm not sure what you are measuring.. at one time the scheduling quantum was independent of Hz. I am not sure how true that is now.. From krassi at bulinfo.net Fri Oct 31 02:04:09 2008 From: krassi at bulinfo.net (Krassimir Slavchev) Date: Fri Oct 31 02:04:16 2008 Subject: 1. thread switching time? (Krassimir Slavchev) In-Reply-To: <490AB750.9040505@elischer.org> References: <000001c93b0c$6195e6b0$2f096f0a@china.huawei.com> <490AB477.2080001@bulinfo.net> <490AB750.9040505@elischer.org> Message-ID: <490ACA04.6060203@bulinfo.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Julian, Julian Elischer wrote: > Krassimir Slavchev wrote: > >> >> Also, I am able to set HZ=100000 but the thread switching time is still >> ~1ms. > > You must be talking about the time that a thread can run before it is > pushed out by other threads? I know I've seem many x 10,000 context > switches in some cases, i.e. look at very high interrupt rates > etc. so I guess I'm not sure what you are measuring.. Okay, I have a thread with: while(1) { clock_gettime(CLOCK_REALTIME, &tv); nanosleep(&delay, NULL); clock_gettime(CLOCK_REALTIME, &tv2); timespecsub(&tv2, &tv); } If the delay is configured to be 0 < delay < 1ms I always get ~1ms delay. Since nanosleep() is a cancellation point this means that the scheduler will switch to another thread. If the delay = 0 I get ~1600ns delay. Yes. You are right. This is "the time that a thread can run before it is pushed out by other threads". Is there a way to decrease this time? > > at one time the scheduling quantum was independent of Hz. > I am not sure how true that is now.. > It seems to be independent of HZ. Best Regards > > _______________________________________________ > freebsd-performance@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > To unsubscribe, send any mail to > "freebsd-performance-unsubscribe@freebsd.org" > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFJCsoDxJBWvpalMpkRAteuAJ9Jd8ICvPSiWB/4eGquUunoclpeXgCgjqyE vBXA0vGoRgsQ9eHZ/YwR/lw= =AjjC -----END PGP SIGNATURE----- From xiazhongqi at huawei.com Fri Oct 31 03:03:42 2008 From: xiazhongqi at huawei.com (Sam Xia) Date: Fri Oct 31 03:03:53 2008 Subject: 1. thread switching time? (Krassimir Slavchev) In-Reply-To: <490ACA04.6060203@bulinfo.net> Message-ID: <000001c93b3f$b5767eb0$2f096f0a@china.huawei.com> hi Krassimir, The smallest time quatum moving a thread from sleep queue to ready queue is equal to one tick(about 1 ms). This is dependent of os scheduling mechanism. Even the delay of nanosleep is less than 1 ms, actually 1 ms is the smallest unit. I guess you should modify the kernel and add clock intr frequency. BR, Sam.Xia > -----Original Message----- > From: Krassimir Slavchev [mailto:krassi@bulinfo.net] > Sent: Friday, October 31, 2008 5:04 PM > To: Julian Elischer > Cc: freebsd-performance@freebsd.org; Sam Xia > Subject: Re: 1. thread switching time? (Krassimir Slavchev) > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello Julian, > > Julian Elischer wrote: > > Krassimir Slavchev wrote: > > > >> > >> Also, I am able to set HZ=100000 but the thread switching time is > >> still ~1ms. > > > > You must be talking about the time that a thread can run > before it is > > pushed out by other threads? I know I've seem many x > 10,000 context > > switches in some cases, i.e. look at very high interrupt > rates etc. so > > I guess I'm not sure what you are measuring.. > > Okay, I have a thread with: > > while(1) { > clock_gettime(CLOCK_REALTIME, &tv); > nanosleep(&delay, NULL); > clock_gettime(CLOCK_REALTIME, &tv2); > timespecsub(&tv2, &tv); > } > > If the delay is configured to be 0 < delay < 1ms I always get > ~1ms delay. > Since nanosleep() is a cancellation point this means that the > scheduler will switch to another thread. > If the delay = 0 I get ~1600ns delay. > > Yes. You are right. This is "the time that a thread can run > before it is pushed out by other threads". > > Is there a way to decrease this time? > > > > > at one time the scheduling quantum was independent of Hz. > > I am not sure how true that is now.. > > > > It seems to be independent of HZ. > > > Best Regards > > > > > _______________________________________________ > > freebsd-performance@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > > To unsubscribe, send any mail to > > "freebsd-performance-unsubscribe@freebsd.org" > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (FreeBSD) > > iD8DBQFJCsoDxJBWvpalMpkRAteuAJ9Jd8ICvPSiWB/4eGquUunoclpeXgCgjqyE > vBXA0vGoRgsQ9eHZ/YwR/lw= > =AjjC > -----END PGP SIGNATURE----- > From raykinsella78 at gmail.com Fri Oct 31 09:08:50 2008 From: raykinsella78 at gmail.com (Ray Kinsella) Date: Fri Oct 31 09:08:57 2008 Subject: Interrupt handling in 6.2 Message-ID: <584ec6bb0810310848q843ed24x3e16880be450a492@mail.gmail.com> Has anyone had any success performance tuning interrupt handling in 6.2 ? I know that there is a improved performance handling mechanism in 7.0 but I kinda stuck using 6.2. The performance of interrupt handling mechanism on 6.2 during "interrupt storms" is quiet poor, is there any anything I tweak to improve it ? Any documentation on the same ? Also I going to post this also in another list, but I tried using the PMCStat and kgmon to profile my interrupt handling kernel objects (ko's, loadable objects). To get a handle on the source of the issue. PMCStat supports profiling ko's in 7.0 but not 6.2, Kgmon suggests that profiling kernel objects should be possible in 6.2, but I have had no success with it. Any documentation I have seen suggests compiling the sources straight into the kernel rather than using ko's to profile, but this is not possible. Has anyone had any luck profiling ko's in 6.2. Thanks Ray Kinsella