Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 May 2004 21:08:52 -0700
From:      David Schultz <das@FreeBSD.ORG>
To:        "P.D. Seniura" <pdseniura@techie.com>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: low HZ value causes "Time Warp Bug" (re: this Puny Pentium2 suddenly became 45% slower!)
Message-ID:  <20040507040852.GA78023@VARK.homeunix.com>
In-Reply-To: <20040507005518.75B6A79004C@ws1-14.us4.outblaze.com>
References:  <20040507005518.75B6A79004C@ws1-14.us4.outblaze.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 06, 2004, P.D. Seniura wrote:
> 
> > > It seems this bug happens when the HZ value goes below 16
> > > (either by compiling 'options HZ=' in kernel or setting
> > > sysctl 'kern.hz=' in /boot/loader.conf).  The computed
> > > 'ticks' value becomes too large for 2-byte int producing
> > > crazy overflowed numbers elsewhere.
> > 
> > 16 is pretty low..
> > Then again it would be nice if it warned you or something similar when you 
> > tried it :)
> 
> Heh, I got HZ set to 20 while it does
> buildworld (~9 hours) and portupgrade overnight. 
> The idea is "less slicing and more doing". ;)

Umm...yeah, don't do that.  For one, 1/(100 Hz) = 10000 us = 4.5
million cycles on your processor, which is an eternity in computer
time.  For two, HZ doesn't affect the maximum timeslice processes
get.  The scheduling quantum is fixed at 100 ms in the 4BSD
scheduler, and it varies between 10 ms and 143 ms in ULE.



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