Re: Optimizing Current

From: Robert Watson <rwatson_at_freebsd.org>
Date: Mon, 12 Jul 2004 13:02:17 -0400 (EDT)
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_at_fledge.watson.org      Principal Research Scientist, McAfee Research
Received on Mon Jul 12 2004 - 15:02:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:01 UTC