lkml.org 
[lkml]   [1999]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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]
\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.017 / U:1.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site