Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2003 14:22:02 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        "akanwar@digitarchy.com" <akanwar@digitarchy.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: HZ = 1000 slows down application
Message-ID:  <20030922142202.A46421@xorpc.icir.org>
In-Reply-To: <63340-220039122184340901@M2W048.mail2web.com>; from akanwar@digitarchy.com on Mon, Sep 22, 2003 at 02:43:40PM -0400
References:  <63340-220039122184340901@M2W048.mail2web.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 22, 2003 at 02:43:40PM -0400, akanwar@digitarchy.com wrote:
...
> But now I noticed that my application is occassionally doing slower
> iterations. Average iteration time used to be 0.2 ms without polling
> enabled. With the device polling changes, the average time is still around
> the same, but once every few minutes the application sees iterations that
> are 3.3 seconds (*seconds*, not a typo) long. 

most likely your application makes some assumptions on the duration of
a clock tick and then it gets confused when, say, a select returns
quicker, or some time difference becomes negative, etc. etc. because
of the finer granularity.

very common type of bug.

	cheers
	luigi

> This seems to happen as soon as I use the kernel with HZ=1000. Enabling or
> disabling device polling does not seem to make any difference to this
> behavior. I am trying to understand why there seem to be a few really long
> iterations. Could it happen that the application does not get any CPU for
> that long? Seems very counter intuitive that higher HZ should cause this. 
> 
> Could anyone shed any light on what is happening ?
> 
> Thanks,
> -ansh
> 
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
> 
> 
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
> 



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