Date: Fri, 09 Jul 2004 13:24:02 -0400 From: Chuck Swiger <cswiger@mac.com> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: current@freebsd.org Subject: Re: default HZ value in 5.2.1 Message-ID: <40EED4B2.2080604@mac.com> In-Reply-To: <25554.1089390410@critter.freebsd.dk> References: <25554.1089390410@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40EED4B2.2080604>