From owner-freebsd-questions@FreeBSD.ORG Tue Apr 5 09:59:32 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E207716A4CE for ; Tue, 5 Apr 2005 09:59:32 +0000 (GMT) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D25B43D4C for ; Tue, 5 Apr 2005 09:59:32 +0000 (GMT) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (net4801-2 [192.168.254.1]) by fw.farid-hajji.net (Postfix) with ESMTP id 349674B398; Tue, 5 Apr 2005 11:59:56 +0200 (CEST) Date: Tue, 5 Apr 2005 11:59:55 +0200 From: cpghost@cordula.ws To: dick hoogendijk Message-ID: <20050405095955.GA72608@fw.farid-hajji.net> References: <20050404091719.GA9748@lothlorien.nagual.st> <20050404093755.GA48928@epia2.farid-hajji.net> <20050405094212.42b93112.dick@nagual.st> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050405094212.42b93112.dick@nagual.st> User-Agent: Mutt/1.5.8i cc: freebsd-questions@freebsd.org Subject: Re: HZ=1000 ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2005 09:59:33 -0000 On Tue, Apr 05, 2005 at 09:42:12AM +0200, dick hoogendijk wrote: > On Mon, 4 Apr 2005 11:37:55 +0200 > cpghost@cordula.ws wrote: > > > Interestingly, HZ=100 has remained constant for decades (!), despite > > CPUs getting faster all the time. This is an excellent value for most > > typical usage patterns. Cranking it up should only be required for > > special cases. Anyway, the HZ knob is there. Experiment with it until > > you get optimal performance. > > Thanks for the explanation. Your last remark puzzles me though. > 'experiment with it until you get optimal performance' Yeah sure. I like > to experiment. I don't want the fuzzy "it /feels/ like its > slower/faster" stuff. Way too subjective. Can someone advise me on some > test software to expermient with? I.e.: I set hz=100 / hz=1000 / hz=2000 > ; with or without polling and I run a testing program that measures the > diffs. Does something like this exists? I don't know if there's a single test suite for this. It all depends on what you want to do with your system. If you have compute intensive tasks (that does not only include numerical computations; stuff like application servers requires a lot of CPU cycles as well!), you would prefer longer time slices, a.k.a. lower HZ values. If your typical mix of applications is more I/O bound and requires more polling and real-time responsiveness, shorter time slices may be better. But, if you have *many* processes, a lower HZ would be better again, because of the thread switching overhead... What you could do (besides that fuzzy feeling) is to measure the wall clock (!) time of processes, their latency (time between request and reply) and so on. I don't think there is a simple formula for "the overall speed/responsiveness" of such a complex system that could be used by a measurement suite. There are just too many aspects involved. You could always measure the performance of your "main" application (say, e.g. a database server) and don't care too much about infrequently used processes. > dick -- http://nagual.st/ -- PGP/GnuPG key: F86289CE > ++ Running FreeBSD 4.11 ++ FreeBSD 5.3 > + Nai tiruvantel ar vayuvantel i Valar tielyanna nu vilja Regards, -cpghost. -- Cordula's Web. http://www.cordula.ws/