From owner-freebsd-current@FreeBSD.ORG Thu May 6 21:08:59 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5FCF16A4CE for ; Thu, 6 May 2004 21:08:59 -0700 (PDT) Received: from VARK.homeunix.com (adsl-68-124-137-57.dsl.pltn13.pacbell.net [68.124.137.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75C3E43D48 for ; Thu, 6 May 2004 21:08:59 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.10/8.12.10) with ESMTP id i4748rAd078184; Thu, 6 May 2004 21:08:53 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.10/8.12.10/Submit) id i4748qnD078183; Thu, 6 May 2004 21:08:52 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 6 May 2004 21:08:52 -0700 From: David Schultz To: "P.D. Seniura" Message-ID: <20040507040852.GA78023@VARK.homeunix.com> Mail-Followup-To: "P.D. Seniura" , Daniel O'Connor , freebsd-current@FreeBSD.ORG References: <20040507005518.75B6A79004C@ws1-14.us4.outblaze.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040507005518.75B6A79004C@ws1-14.us4.outblaze.com> cc: freebsd-current@FreeBSD.ORG Subject: Re: low HZ value causes "Time Warp Bug" (re: this Puny Pentium2 suddenly became 45% slower!) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2004 04:08:59 -0000 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.