From owner-freebsd-multimedia Fri Jun 5 08:07:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA08894 for freebsd-multimedia-outgoing; Fri, 5 Jun 1998 08:07:09 -0700 (PDT) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from miller.cs.uwm.edu (miller.cs.uwm.edu [129.89.139.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA08871 for ; Fri, 5 Jun 1998 08:07:04 -0700 (PDT) (envelope-from james@miller.cs.uwm.edu) Received: (from james@localhost) by miller.cs.uwm.edu (8.8.5/8.8.5) id KAA22876; Fri, 5 Jun 1998 10:07:02 -0500 (CDT) Date: Fri, 5 Jun 1998 10:07:02 -0500 (CDT) From: Jim Lowe Message-Id: <199806051507.KAA22876@miller.cs.uwm.edu> To: mjh@east.isi.edu Subject: Re: Tick, tock, I need a fast clock... Cc: multimedia@FreeBSD.ORG Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > From: Mark Handley > > >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