From owner-freebsd-stable@FreeBSD.ORG Fri Apr 28 18:28:22 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 3BD0516A400 for ; Fri, 28 Apr 2006 18:28:22 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34DB243D6B for ; Fri, 28 Apr 2006 18:28:19 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 14A6F1A3C31; Fri, 28 Apr 2006 11:28:19 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 52C6655FC6; Fri, 28 Apr 2006 14:28:18 -0400 (EDT) Date: Fri, 28 Apr 2006 14:28:18 -0400 From: Kris Kennaway To: Dmitry Pryanishnikov Message-ID: <20060428182818.GA10410@xor.obsecurity.org> References: <20060427160536.M96305@atlantis.atlantis.dp.ua> <20060427181226.GA66431@xor.obsecurity.org> <20060428122448.K57436@atlantis.atlantis.dp.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline In-Reply-To: <20060428122448.K57436@atlantis.atlantis.dp.ua> User-Agent: Mutt/1.4.2.1i Cc: freebsd-stable@freebsd.org, Kris Kennaway 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 18:28:22 -0000 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 28, 2006 at 03:31:17PM +0300, Dmitry Pryanishnikov wrote: >=20 > Hello! >=20 > On Thu, 27 Apr 2006, Kris Kennaway wrote: >=20 > Thanks for your suggestions, they've made a difference (though not as big > as one could hope). >=20 > >On Thu, Apr 27, 2006 at 05:08:11PM +0300, Dmitry Pryanishnikov wrote: > > > >>makeoptions CONF_CFLAGS=3D-fno-builtin > > > >Non-default option; this may conceivably affect performance. >=20 > The reason why I've initially included this option is the following > comment (NOTES from RELENG_6): >=20 > # > # 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). > # >=20 > I've read this: using "CONF_CFLAGS=3D-fno-builtin" inhibits use of non-op= timal > gcc builtin functions, so this option may be useful for getting max.=20 > performance. Are this comment and my interpretation still correct now? I don't know, it needs to be tested in your particular case. > >> %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 > %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 >=20 > RELENG_6 + rl0 34 24 42 1:43 > RELENG_6 + fxp0 30 20 50 1:40 >=20 > So performance now is much better then before removal of >=20 > makeoptions CONF_CFLAGS=3D-fno-builtin > options INVARIANTS > options INVARIANT_SUPPORT > options QUOTA >=20 > (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 tim= e,=20 > while under RELENG_5 / 6 it takes >=3D 50% ;( Thanks. Silly question: the data transfer rate is the same on both 4.x and 6.x, right? i.e. the data transfer itself takes the same time? The next step is for you to run some profiling tests to see where the kernel is spending time, e.g. with hwpmc. Also, when you are trying to quantify performance differences, you need to run many copies of the test (at least 10) under identical conditions to account for possible variations. The ministat tool (/usr/src/tools/tools/ministat) is good for performing statistically meaningful comparisons of data sets when you have them. Kris --jI8keyz6grp/JLjh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEUl7BWry0BWjoQKURAmYYAJ9IT2reS/gdAJKV47809KQ8xeAZKACeOlvW lrD80dnhpdehM6cN76tBQ6I= =8KTE -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh--