From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 13 17:22:55 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 533D716A407 for ; Wed, 13 Sep 2006 17:22:55 +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 7A9BE43D58 for ; Wed, 13 Sep 2006 17:22:54 +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 467FB1A3C20; Wed, 13 Sep 2006 10:22:54 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 8CD4651305; Wed, 13 Sep 2006 13:22:53 -0400 (EDT) Date: Wed, 13 Sep 2006 13:22:53 -0400 From: Kris Kennaway To: Mike Meyer Message-ID: <20060913172253.GA17499@xor.obsecurity.org> References: <17672.14633.859999.417883@bhuda.mired.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <17672.14633.859999.417883@bhuda.mired.org> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: numbers don't lie ... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2006 17:22:55 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 13, 2006 at 01:00:25PM -0400, Mike Meyer wrote: > > SUN X4100: Dual Core AMD Opteron(tm) Processor 280 (2393.19-MHz K8-cla= ss CPU) > > one 70g sata disk > > DELL 2950: Intel(R) Xeon(TM) CPU 3.20GHz (3192.98-MHz K8-class CPU) > > 4 sata disks + raid0 > >=20 > > they both run identical 6.1-STABLE. > >=20 > > my 'cpu benchmark' shows the amd being much better than the intel. > > but, doing a make buildworld give interesting results: > >=20 > > dell-2950 : make -j16 TARGET_ARCH=3Damd64 buildworld : 24m17.41s real 1= h3m3.26s=20 > > user 17m15.07s sys > > dell-2950 : make -j8 TARGET_ARCH=3Damd64 buildworld : 24m8.28s real 1h2= m59.38s=20 > > user 16m16.20s sys > >=20 > > sunfire : make -j16 TARGET_ARCH=3Damd64 buildworld : 24m21.38s real 49m= 6.68s=20 > > user 14m22.64s sys > > sunfire : make -j8 TARGET_ARCH=3Damd64 buildworld : 23m47.69s real 48m5= 3.58s=20 > > user 13m44.81s sys > >=20 > > which probably says something about my 'cpu benchmark' :-( >=20 > Yes - that it's not very good at predicting performance on a parallel > make. That's not surprising, as it's true of most benchmarks. You > might want to check out some of the benchmarks in the ports tree as > well. >=20 > > but why is the user time so much different between the boxes? >=20 > What's the CPU configuration? The AMD is dual core - is that it? Could > the Xeon be dual-core and hyperthreaded, so it's got that many more > CPUs to contribute towards user time? >=20 > To illustrate, I have numbers for "make -j4" for a P4 with and without > hyperthreading enabled: >=20 > machdep.hyperthreading_allowed: 1 -> 0 > 50m55.99s real 35m28s.19 user 8m20s.02 sys > machdep.hyperthreading_allowed: 0 -> 1 > 38m48s.85 real 55m2s.43 user 12m27s.90 sys >=20 > Note the effect of the second CPU on the user time. i.e. since the hyperthreading virtual CPUs are not actually real CPUs, they spend a lot of time blocked in the same CPU core waiting for another hyperthread to release a resource, so the threads are both "running" from the point of view of the OS, but one is doing no work on the CPU a lot of the time. This means that hyperthreading may or may not increase your performance depending on your workload (in your case it does). Kris --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFCD5sWry0BWjoQKURAlwTAKCX7BnLNqbKa5jug7QU+pyk4HSx9QCfXvEd 7ovzThF90AyVJ/dbkwwT5LY= =CZoW -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+--