Messages in this thread | | | Date | Thu, 1 Jul 1999 19:03:31 +0200 | From | Kurt Garloff <> | Subject | Re: HZ and real-time performance |
| |
On Thu, Jul 01, 1999 at 08:48:19PM +0200, Benno Senoner wrote: > > I'd suggest you try my HZ=400 patch from http://www.garloff.de/kurt/linux/ > > (It not only sets the HZ value to 400, but also fixes the times reported to > > userspace.) and test it out. > > I found your patch some time ago, and modified it for 1000HZ , > (changing all 4's to 10's :-) ) , and it works quite well > but what are the implications (are these serious) of wrong times reported to userspace ? > do you know which syscalls will report wrong times ?
sys_times and accesses to the /proc fs report wrong time informations, if not patched. I hope, I did not forget anything within my patch.
The factor of 4 was chosen, becaus it permits the Compiler to optimize the division by to be replace by a right shift, so calling sys_times incurs less overhead. Anyway, it should not matter too much.
> PS: does anyone a reasonable upper limit to HZ on PII hardware ? > will increase HZ too much lead to cache-performance drops, > du too much context switching ? > > I think 2000 would not degrade much the performance on a PII class system. > (If i remember BeOS has 250usec scheduling latencies HZ=4000 ? )
I think with iPII hardware, you can go well above 1000 withouzt loosing too much time. Basically, you loose more time with higher timer frequencies, because * the scheduler is run more often (code which has to be executed) * context switches due to the timer interrupt * task switches as a consequence of scheduler runs * useless cache contents after context switches ...
Advantages are probably: * Smaller scheduling latencies * Higher serial speeds possible without enlarging the buffer * Better performance of multithreaded apps in presence of scheuler bugs (this was the case before 2.2.8)
Regards, -- Kurt Garloff <garloff@suse.de> SuSE GmbH, Nürnberg, FRG Linux kernel development; SCSI driver: DC390 (tmscsim/AM53C974) [unhandled content-type:application/pgp-signature] | |