From owner-freebsd-current@FreeBSD.ORG Fri Jul 9 17:24:22 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 6371516A4CE for ; Fri, 9 Jul 2004 17:24:22 +0000 (GMT) Received: from out011.verizon.net (out011pub.verizon.net [206.46.170.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id F296B43D4C for ; Fri, 9 Jul 2004 17:24:21 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from [192.168.1.3] ([68.161.84.3]) by out011.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040709172421.CBPC18566.out011.verizon.net@[192.168.1.3]>; Fri, 9 Jul 2004 12:24:21 -0500 Message-ID: <40EED4B2.2080604@mac.com> Date: Fri, 09 Jul 2004 13:24:02 -0400 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Poul-Henning Kamp References: <25554.1089390410@critter.freebsd.dk> In-Reply-To: <25554.1089390410@critter.freebsd.dk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out011.verizon.net from [68.161.84.3] at Fri, 9 Jul 2004 12:24:21 -0500 cc: Chris Stenton cc: current@freebsd.org Subject: Re: default HZ value in 5.2.1 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, 09 Jul 2004 17:24:22 -0000 Poul-Henning Kamp wrote: [ ... ] > Most of my systems run with HZ=1000 already, but that is hardly > ground for changes to the default. What we need is some pro et > contra arguments, including benchmarks. You're right. Back around 1990, Avie Tenavian spent some brainpower figuring out the preemptive scheduling overhead for Mach, and determined that a 25MHz 68040 machine took up to about 0.5 ms to handle a timer interrupt and run through the scheduler, which meant that the system lost about 5% overhead when using a 10ms scheduler quantum (or HZ=100, whatever). While I think have some idea as to the time it takes a Pentium to do a context switch (300 clocks?), I don't know enough about the way the clock timer is managed under FreeBSD, nor do I know how much other stuff is glommed onto the periodic timer interrupt. Mach used kernel threads and a messaging paradigm from day one, so it's scheduler was fairly simple-- less worrying about a queue of pending callbacks along the lines of libevent and kqueue. Anyway, I suspect that the default scheduler quantum might be better chosen based on the scheduling overhead of each machine: set HZ as fast as the local system will deal with without exceeding a single-digit percent overhead... -- -Chuck