HZ=1000 ?

cpghost at cordula.ws cpghost at cordula.ws
Tue Apr 5 02:59:33 PDT 2005


On Tue, Apr 05, 2005 at 09:42:12AM +0200, dick hoogendijk wrote:
> On Mon, 4 Apr 2005 11:37:55 +0200
> cpghost at cordula.ws wrote:
> 
> > Interestingly, HZ=100 has remained constant for decades (!), despite
> > CPUs getting faster all the time. This is an excellent value for most
> > typical usage patterns. Cranking it up should only be required for
> > special cases. Anyway, the HZ knob is there. Experiment with it until
> > you get optimal performance.
> 
> Thanks for the explanation. Your last remark puzzles me though.
> 'experiment with it until you get optimal performance' Yeah sure. I like
> to experiment. I don't want the fuzzy "it /feels/ like its
> slower/faster" stuff. Way too subjective. Can someone advise me on some
> test software to expermient with? I.e.: I set hz=100 / hz=1000 / hz=2000
> ; with or without polling and I run a testing program that measures the
> diffs. Does something like this exists?

I don't know if there's a single test suite for this. It all depends on
what you want to do with your system. If you have compute intensive
tasks (that does not only include numerical computations; stuff like
application servers requires a lot of CPU cycles as well!), you would
prefer longer time slices, a.k.a. lower HZ values. If your typical
mix of applications is more I/O bound and requires more polling and
real-time responsiveness, shorter time slices may be better. But, if
you have *many* processes, a lower HZ would be better again, because
of the thread switching overhead...

What you could do (besides that fuzzy feeling) is to measure the
wall clock (!) time of processes, their latency (time between request
and reply) and so on. I don't think there is a simple formula for
"the overall speed/responsiveness" of such a complex system that could
be used by a measurement suite. There are just too many aspects involved.
You could always measure the performance of your "main" application
(say, e.g. a database server) and don't care too much about infrequently
used processes.

> dick -- http://nagual.st/ -- PGP/GnuPG key: F86289CE
> ++ Running FreeBSD 4.11 ++ FreeBSD 5.3
> + Nai tiruvantel ar vayuvantel i Valar tielyanna nu vilja

Regards,
-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/


More information about the freebsd-questions mailing list