From owner-freebsd-current@FreeBSD.ORG Mon Jul 12 17:02:30 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 247B616A4CE for ; Mon, 12 Jul 2004 17:02:30 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id D174543D39 for ; Mon, 12 Jul 2004 17:02:29 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i6CH2IeY047462; Mon, 12 Jul 2004 13:02:18 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i6CH2IKs047459; Mon, 12 Jul 2004 13:02:18 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Mon, 12 Jul 2004 13:02:17 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Jason Dusek In-Reply-To: <40F21606.1000003@uiowa.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: Optimizing Current 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: Mon, 12 Jul 2004 17:02:30 -0000 On Sun, 11 Jul 2004, Jason Dusek wrote: > I read /usr/src/UPGRADING today and it says that I should set some > special flags > if I want high performance. Where do I find out about these flags? If you're using a uniprocessor system, recompile the kernel without "options SMP" and possibly without "device apic". For UP and SMP, see also some other responses you've gotten about disabling WITNESS, INVARIANTS, and other debugging features like malloc debugging, as they are very expensive (but good for debugging). If you're using SMP, turn on "options ADAPTIVE_MUTEXES". You may also want to explore running the network stack MPSAFE if your workload is sensitive to parallelism in the network stack and certain types of IPC (I.e., MySQL). Some caution is required here since that's still pretty experimental stuff and there are known defficiencies. If you have a box with hyperthread support, you might want to trying turning it off in the BIOS. I've found it detrimental to most of the workloads I care about. Either way, you might want to look at scheduler selection. The default is current SCHED_ULE; I've observed that depending on scheduler choice, different workloads do quite differently. With high-volume MySQL transactions, I found 4BSD blew away ULE. With other microbenchmarks and interactivity, we've had reports of quite the opposite with other workloads. Through a combination of these techniques, I took a query-intensive threaded MySQL database benchmark from about 2550 queries/sec on SMP to 7100 queries/sec on my dual-Xeon box. The 2550 is w/o debugging, FYI; I shudder to guess what the performance would be like with debugging :-). Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research