From owner-freebsd-arch@FreeBSD.ORG Sun Nov 26 17:44:22 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8B2A16A47B for ; Sun, 26 Nov 2006 17:44:22 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id A067C43D53 for ; Sun, 26 Nov 2006 17:43:25 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 6BB4D46CA0; Sun, 26 Nov 2006 12:44:20 -0500 (EST) Date: Sun, 26 Nov 2006 17:44:20 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ivan Voras In-Reply-To: Message-ID: <20061126174041.V83346@fledge.watson.org> References: <20061119041421.I16763@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@freebsd.org Subject: Re: What is the PREEMPTION option good for? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Nov 2006 17:44:22 -0000 On Thu, 23 Nov 2006, Ivan Voras wrote: > Ivan Voras wrote: >> Bruce Evans wrote: >> >>> Most of the difference is caused by pgzero becoming too active with >>> PREEMPTION. >> >> Don't know about the other things but I've noticed pagezero is suspiciously >> active on heavy loaded SMP web servers (even complained on @stable a long >> time ago). I'll try disabling PREEMPTION and see how it goes. > > Ok, I couldn't run extensive tests because people were waiting to use the > machine, so this should be considered anecdotal evidence. On a simple > benchmark that repeatedly (for 1 minute) and concurrently (target=50 > concurrent requests) hits a dynamic web page on a development machine (2 > proc true SMP), the performance goes up from ~85 requests/sec. to ~105 > requests/s by disabling PREEMPTION. This improvement looks suspiciously high > to me, but I don't think I'll be going back :) pagezero is now not noticable > in 'top' output. There's a known performance regression with PREEMPTION and loopback network traffic on UP or UP-like systems due to a poor series of context switches occuring in the network stack. If your benchmark involves the above web load over the loopback, that could be the source of what you're seeing. If it's not loopback traffic, then that's not the source of the problem. You might try fiddling with kern.sched.ipiwakeup.enabled and see what the effect is, btw -- this controls whether or not the scheduler wakes up another idle CPU to run a thread when waking up that thread, rather than queuing it to run which may occur on the other CPU at the next clock tick. Robert N M Watson Computer Laboratory University of Cambridge