Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jun 1998 10:07:02 -0500 (CDT)
From:      Jim Lowe <james@miller.cs.uwm.edu>
To:        mjh@east.isi.edu
Cc:        multimedia@FreeBSD.ORG
Subject:   Re: Tick, tock, I need a fast clock...
Message-ID:  <199806051507.KAA22876@miller.cs.uwm.edu>

next in thread | raw e-mail | index | archive | help
> From: Mark Handley <mjh@east.isi.edu>
> 
> >Are there any timers available to applications in FreeBSD faster than
> >10ms?  If not, is there a simple way to increase the interval timers
> >minimal time to something like .1ms without adversely effecting system
> >performance?
> 
> I has the same requirement earlier this week.  You can change the
> value of HZ in /usr/src/sys/conf/param.c from the default value of 100
> to something larger and rebuild.  My system is currently running with
> this set to 1000, which allows interval timers using select of around
> 2ms (why isn't it 1ms??).  The system seems to run fine, but the
> values measured for per-process CPU utilization by top (and presumably
> other utilities) are low by an order of magnitude.  Presumably this is
> a bug in some of the kernel stats code.

Do you know if this effects overall performance of the system?  Does
the scheduler run 10 times faster as well?  I am not sure what is
tied to the ``HZ'' clock (I suspect a lot of things).  I would like
to bump the clock to 10,000 or 100,000 to get better resolutions
out of the timer routines -- but I don't know what else happens
when you do this.

I think 1ms vs 2ms is a POSIXism.  If you specify 1ms, then you will get
at a minimum 1ms, but you might get 2ms.  This is also true if the clock
is set at 100hz, you might get 20ms min delay.

> 
> It does seem somewhat rediculous that HZ is still set to 100 by
> default in these days of 400MHz processors.

Yes, there should be timers available to at least the .1ms and
even .01ms.  Having 10ms being the smallest resolution is becoming
a problem for some applications.

	-Jim

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806051507.KAA22876>