Date: Thu, 19 Aug 2004 09:26:14 +0200 From: Marc Fonvieille <blackend@freebsd.org> To: Mike Tancsa <mike@sentex.net> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: Weird performances: -CURRENT vs 5.2.1 Message-ID: <20040819072614.GA19508@abigail.blackend.org> In-Reply-To: <6.1.2.0.0.20040818170232.05773880@64.7.153.2> References: <20040818200530.GA88370@abigail.blackend.org> <20040818205029.GA48028@xor.obsecurity.org> <6.1.2.0.0.20040818170232.05773880@64.7.153.2>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 18, 2004 at 05:05:13PM -0400, Mike Tancsa wrote: > > Hi, > As someone who is also going to start testing the waters with > RELENG_5 on some non critical production servers (e.g. one of n spam and av > scanning machines), I take it you mean, > > > NOTE TO PEOPLE WHO THINK THAT FreeBSD 5.x IS SLOW: > FreeBSD 5.x has many debugging features turned on, in > both the kernel and userland. These features attempt to detect > incorrect use of system primitives, and encourage loud failure > through extra sanity checking and fail stop semantics. They > also substantially impact system performance. If you want to > do performance measurement, benchmarking, and optimization, > you'll want to turn them off. This includes various WITNESS- > related kernel options, INVARIANTS, malloc debugging flags > in userland, and various verbose features in the kernel. Many > developers choose to disable these features on build machines > to maximize performance. > > > Are there more details somewhere as to what exactly to turn off and tweak ? > It's not really documented. To sum up, you have to remove these lines from your kernel configuration file: makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols # Debugging for use in -current options KDB # Enable kernel debugger support. options DDB # Support DDB. options GDB # Support remote GDB. options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal struct ures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for spe ed In fact INVARIANTS and WITNESS related lines are the more important to maximize performance, the others lines do not really change things. And then do a: ln -s aj /etc/malloc.conf This one is important too, by default malloc routines uses AJ flags (be careful with the case) under -CURRENT, even if you don't have any malloc.conf file, look at malloc(3) manual page for more details. Marc
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040819072614.GA19508>