Subject: Re: timing issue
To: None <>
From: Manuel Badzong <>
List: netbsd-users
Date: 11/26/2006 02:40:49
Chuck Swiger wrote:
> What does everybody have their scheduler quantum set to (kern.hz or 
> maybe kern.clockrate sysctl?) set to?
> If HZ=100, it's possibly reasonable for the process to not be able to 
> sleep and have the kernel return to the process in less than one 
> quantum, aka 10 ms.  It might be the case that setting the scheduler 
> to HZ=1000 will significantly improve the observed latency for this test.
Sorry, I was a few days off. Anyway, thanks for all the answers.

For the archives: After recompiling the Kernel with HZ=1000 the latency 
dropped below 1ms (exactly like FreeBSD 6.1, which uses a default 
clockrate of 1000 Hz). The new output of timing.c looks like:

timeout:         1000 usec
loops:           1000

gettimeofday:     2.5 usec
nanosleep:     1996.9 usec
usleep:        1997.4 usec
select:        1998.3 usec

Regards, Manuel