From owner-freebsd-current@FreeBSD.ORG Thu Aug 19 19:44:52 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 B714E16A4CE; Thu, 19 Aug 2004 19:44:52 +0000 (GMT) Received: from adhoc.bluemidnight.ca (CPE000021ffb7ce-CM023459906096.cpe.net.cable.rogers.com [24.157.86.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BFA243D39; Thu, 19 Aug 2004 19:44:51 +0000 (GMT) (envelope-from craig@bluemidnight.ca) Received: from d226-126-88.home.cgocable.net ([24.226.126.88] helo=redline) by adhoc.bluemidnight.ca with smtp (Exim 4.34 (FreeBSD)) id 1Bxsq7-000674-OG; Thu, 19 Aug 2004 15:44:47 -0400 Message-ID: <001201c48625$0492fbb0$0200000a@redline> From: "Craig Reyenga" To: "sam" , "Marc Fonvieille" References: <20040818200530.GA88370@abigail.blackend.org><20040818205029.GA48028@xor.obsecurity.org><6.1.2.0.0.20040818170232.05773880@64.7.153.2><20040819072614.GA19508@abigail.blackend.org> <4124573F.50403@tech-21.com.hk> Date: Thu, 19 Aug 2004 15:44:59 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 cc: freebsd-current@freebsd.org cc: Mike Tancsa cc: Kris Kennaway Subject: Re: Weird performances: -CURRENT vs 5.2.1 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: Thu, 19 Aug 2004 19:44:52 -0000 ----- Original Message ----- From: "sam" To: "Marc Fonvieille" Cc: "Kris Kennaway" ; ; "Mike Tancsa" Sent: Thursday, August 19, 2004 3:31 AM Subject: Re: Weird performances: -CURRENT vs 5.2.1 > Marc Fonvieille wrote: > > >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 looks like a trick. "aj" is actually not existed in the system. > You meant created a malloc.conf pointing to a non-exist aj for the > improvment of the malloc operation? > > root@fbsd [3:31pm] [...i386/conf]# ls -l /etc/malloc.conf > lrwxr-xr-x 1 root wheel 2 Aug 19 15:31 /etc/malloc.conf@ -> aj > root@fbsd [3:34pm] [...i386/conf]# > > root@fbsd [3:34pm] [...i386/conf]# ls -l /etc/aj > ls: /etc/aj: No such file or directory > root@fbsd [3:34pm] [...i386/conf]# > malloc.conf is a symlink read by the kernel to find its configuration. I haven't looked at the code, but I assume that the kernel uses readlink() and just finds what chars are in it. This is way less bother than opening a configuration file and reading it (not to mention a huge amount of error handling, and security risks). man malloc.conf for more information. -Craig > Sam > > >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 > > > > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >