Hello, i be very surprised about the performance of RELENG_6. Congratulations to the entire Team for this very good work. Now i have 2 Machines installed with 6.0-RC1, and i have seen that on both machines the Hz is differntly with GENERIC-Kernel. Machine A is an Sempron 2400+ that runs as 2500+ (i have tuned the clock to best RAM-Performace) Machine B is an Duron 700MHz On Machine A i got an Hz from 2000 effectively systat -vmstat 1 show me 2000 IRQ/s on clk sysctl say's 1000....i think, but not sure On Machine B i got an Hz from 1000 effectively systat-vmstat 1 show me 1000 IRQ/s on clk After digging in the source i have found that timec.c have an routine for computing the so called "Hz quality". Can anyone explain me the "mystics" behind Hz quality, and why or how this quality is computed and what are the efforts? My knowledge is not deep enough to know these details. thanks best regards michael
Michael Schuh <michael.schuh@gmail.com> wrote: > i be very surprised about the performance of RELENG_6. > Congratulations to the entire Team for this very good work. > > Now i have 2 Machines installed with 6.0-RC1, and i have seen that on > both machines the Hz is differntly with GENERIC-Kernel. "sysctl kern.clockrate" tells you the HZ value. In FreeBSD 6 the dafult is 1000, unless you change it via "options HZ=x" in your kernel configuration. The values from systat(1) or vmstat(8) are not reliable, because the counters are only 32bit and can overflow. For example, one machine here with HZ=1000 reports only 428 in "vmstat -i": $ sysctl kern.boottime ; date +%s ; vmstat -i | grep clk kern.boottime: { sec = 1123867316, usec = 744735 } Fri Aug 12 19:21:56 2005 1131378875 clk irq0 3216967596 428 Dividing the counter value by the uptime (in seconds) seems to confirm the bogus rate of 428: $ runtime='( 1131378875 - 1123867316 )' $ echo '3216967596 / $runtime' | bc 428 But the 32bit counter has already overflowed once, so we have to add 2^32. This gives the correct value: $ echo '( 3216967596 + 2 ^ 32 ) / $runtime' | bc 1000 > After digging in the source i have found that timec.c have an routine for > computing the so called "Hz quality". During boot, the kernel probes several time counters and assigns "quality" values. Typically you have three of them (i8254, ACPI, TPC). The time counter with the highest quality value will be used for timing by default, but you can change it via sysctl if you know what you are doing. Type "sysctl kern.timecounter" and see the result. > Can anyone explain me the "mystics" behind Hz quality, > and why or how this quality is computed and what are the > efforts? The reason for that is to have a time counter that is as precise and reliable as possible. For example, TPC has issues on SMP and power-managed machines, therefore it is not as reliable as ACPI, so usually the ACPI timecounter has higher quality (although it takes more clock cycles to query it). Oh, there's also a timecounter called "dummy", which does not count time at all. :-) It exists for debugging purposes only, AFAIK, and has a negative quality value, so it is never selected automatically. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "When your hammer is C++, everything begins to look like a thumb." -- Steve Haflich, in comp.lang.c++
On Monday, 7. November 2005 17:10, Oliver Fromme wrote:> Michael Schuh <michael.schuh@gmail.com> wrote: > > i be very surprised about the performance of RELENG_6. > > Congratulations to the entire Team for this very good work. > > > > Now i have 2 Machines installed with 6.0-RC1, and i have seen that on > > both machines the Hz is differntly with GENERIC-Kernel. > > "sysctl kern.clockrate" tells you the HZ value. > In FreeBSD 6 the dafult is 1000, unless you change > it via "options HZ=x" in your kernel configuration.... or via the kern.hz loader tunable. -- ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20051107/49f35b9f/attachment.bin
Hello, thanks to Oliver and Michael for explain me the "mechanics" behind timecounter and "Hz quality". I have send the question, why i have to wonder about different IRQ-Counts but same HZ. It is really thaat HZ on both machines is the same. I have only knowed the old behavior. I set the HZ over Options HZ in my Kernelconfig, and then i could see that the IRQCount's on clk are alwas the same value as HZ +- a few tics. So that i have thinked ( and feeled on busy machines) that the IRQ-work is more smooth and they are less holes in responsitivity if the HZ is going to an Value > 1000. So i have alwas set HZ to 2000 on every machine. If i have the answers and the "mechanics" behind timecounter and "Hz quality" right understand, so i have no more modify the HZ Value to become an smooth polling of the interupts. if i be right the smooth behavior comes with the calculation from "Hz quality". Please correct me if i am wrong. thanks to all and best regards michael 2005/11/7, Michael Schuh <michael.schuh@gmail.com>:> Hello, > > i be very surprised about the performance of RELENG_6. > Congratulations to the entire Team for this very good work. > > Now i have 2 Machines installed with 6.0-RC1, and i have seen that on > both machines the Hz is differntly with GENERIC-Kernel. > Machine A is an Sempron 2400+ that runs as 2500+ > (i have tuned the clock to best RAM-Performace) > Machine B is an Duron 700MHz > > On Machine A i got an Hz from 2000 effectively > systat -vmstat 1 show me 2000 IRQ/s on clk > sysctl say's 1000....i think, but not sure > > On Machine B i got an Hz from 1000 effectively > systat-vmstat 1 show me 1000 IRQ/s on clk > > After digging in the source i have found that timec.c have an routine for > computing the so called "Hz quality". > > Can anyone explain me the "mystics" behind Hz quality, > and why or how this quality is computed and what are the > efforts? > > My knowledge is not deep enough to know these details. > > thanks > > best regards > > michael >