Re: HZ and real-time performance

Kurt Garloff (garloff@suse.de)
Thu, 1 Jul 1999 19:03:31 +0200


--3V7upXqbjpZ4EhLz
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

On Thu, Jul 01, 1999 at 08:48:19PM +0200, Benno Senoner wrote:
> > I'd suggest you try my HZ=3D400 patch from http://www.garloff.de/kurt/l=
inux/
> > (It not only sets the HZ value to 400, but also fixes the times reporte=
d 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 ?
>=20
> I think 2000 would not degrade much the performance on a PII class system.
> (If i remember BeOS has 250usec scheduling latencies HZ=3D4000 ? )

I think with iPII hardware, you can go well above 1000 withouzt loosing too
much time.=20
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
=2E..

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,
--=20
Kurt Garloff <garloff@suse.de> SuSE GmbH, N=FCrnberg, FRG
Linux kernel development; SCSI driver: DC390 (tmscsim/AM53C974)

--3V7upXqbjpZ4EhLz
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3in

iQCVAwUBN3ufYxaQN/7O/JIVAQFg/gP/c3sek7nzXO/KysP78VdBPMz+TuWy6dz6
3aLBVayGDUMwX/VsEjIQgu9vTUPf8F9JYVY+l/L9W4J7oMR2YiKQpccY9h7gma8q
B/m8djoheuxxuJcZVK2AX9j04UYWWRLRrwKCJOSY+c1D04wPXrtClB603JD/nrYb
EaHVjX8ok+o=
=g5Dz
-----END PGP SIGNATURE-----

--3V7upXqbjpZ4EhLz--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/