From owner-freebsd-stable@FreeBSD.ORG Fri Apr 28 12:31:27 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4075F16A400 for ; Fri, 28 Apr 2006 12:31:27 +0000 (UTC) (envelope-from dmitry@atlantis.dp.ua) Received: from postman.atlantis.dp.ua (postman.atlantis.dp.ua [193.108.47.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CF4243D46 for ; Fri, 28 Apr 2006 12:31:25 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by postman.atlantis.dp.ua (8.13.1/8.13.1) with ESMTP id k3SCVHJs035308; Fri, 28 Apr 2006 15:31:17 +0300 (EEST) (envelope-from dmitry@atlantis.dp.ua) Date: Fri, 28 Apr 2006 15:31:17 +0300 (EEST) From: Dmitry Pryanishnikov To: Kris Kennaway In-Reply-To: <20060427181226.GA66431@xor.obsecurity.org> Message-ID: <20060428122448.K57436@atlantis.atlantis.dp.ua> References: <20060427160536.M96305@atlantis.atlantis.dp.ua> <20060427181226.GA66431@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-stable@freebsd.org Subject: Re: RELENG_4 -> 5 -> 6: significant performance regression X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 12:31:27 -0000 Hello! On Thu, 27 Apr 2006, Kris Kennaway wrote: Thanks for your suggestions, they've made a difference (though not as big as one could hope). > On Thu, Apr 27, 2006 at 05:08:11PM +0300, Dmitry Pryanishnikov wrote: > >> makeoptions CONF_CFLAGS=-fno-builtin > > Non-default option; this may conceivably affect performance. The reason why I've initially included this option is the following comment (NOTES from RELENG_6): # # CONF_CFLAGS gives some extra compiler flags that are added to ${CFLAGS} # after most other flags. Here we use it to inhibit use of non-optimal # gcc builtin functions (e.g., memcmp). # I've read this: using "CONF_CFLAGS=-fno-builtin" inhibits use of non-optimal gcc builtin functions, so this option may be useful for getting max. performance. Are this comment and my interpretation still correct now? >> options INVARIANTS >> options INVARIANT_SUPPORT > > These definitely effect performance, much more in 5.x and 6.x (at the > 10-20% level) than 4.x. It's a pity - those help to catch a lot of software bugs ;( >> options QUOTA > > This definitely effects performance on 6.x since it makes your > filesystem giant-locked, which may also interfere with your network > processing. It's also a pity. >> %Sys %Intr %Idl >>RELENG_4 + rl0 14 14 72 >>RELENG_4 + fxp0 14 10 76 >>RELENG_5 + rl0 40 30 30 >>RELENG_5 + fxp0 35 25 40 >>RELENG_6 + rl0 45 40 15 >>RELENG_6 + fxp0 45 35 20 > > Please retry without. Also make sure there are no other diagnostic > messages at boot time about e.g. mpsafenet being forced to 0. I've removed all mentioned options and redone benchmarks. There are no diagnostics about mpsafe* (last one I've seen due to IPSEC, and I've replaced it with FAST_IPSEC+crypto before doing previous benchmarks). New results are pretty close for RELENG_5 and RELENG_6: %Sys %Intr %Idl "time md5 -t" wall clock time RELENG_5 + rl0 33 23 44 1:41 RELENG_5 + fxp0 30 20 50 1:36 RELENG_6 + rl0 34 24 42 1:43 RELENG_6 + fxp0 30 20 50 1:40 So performance now is much better then before removal of makeoptions CONF_CFLAGS=-fno-builtin options INVARIANTS options INVARIANT_SUPPORT options QUOTA (I'll try to find out which one of these takes which % of overhead when I get free time), but still much worse then under RELENG_4, where this particular (I'd say "quote common") usage pattern takes 24-28% of CPU time, while under RELENG_5 / 6 it takes >= 50% ;( > Kris Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE