Date: Mon, 12 Jul 2004 13:02:17 -0400 (EDT) From: Robert Watson <rwatson@freebsd.org> To: Jason Dusek <jason-dusek@uiowa.edu> Cc: current@freebsd.org Subject: Re: Optimizing Current Message-ID: <Pine.NEB.3.96L.1040712123223.34546A-100000@fledge.watson.org> In-Reply-To: <40F21606.1000003@uiowa.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1040712123223.34546A-100000>