From owner-freebsd-amd64@FreeBSD.ORG Fri Jul 29 11:02:06 2005 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 504AA16A41F for ; Fri, 29 Jul 2005 11:02:06 +0000 (GMT) (envelope-from uidzero@bsdhacker.org) Received: from smtp2.suscom.net (smtp2.suscom.net [64.78.83.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8229B43D46 for ; Fri, 29 Jul 2005 11:02:05 +0000 (GMT) (envelope-from uidzero@bsdhacker.org) Received: from localhost (smtp2.suscom.net [127.0.0.1]) by smtp2.suscom.net (Postfix) with ESMTP id D99FB1CDCF0; Fri, 29 Jul 2005 06:53:46 -0400 (EDT) Received: from smtp2.suscom.net ([127.0.0.1]) by localhost (smtp2 [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 15954-02; Fri, 29 Jul 2005 06:53:43 -0400 (EDT) Received: from [216.45.135.174] (ip174.135.45.216.susc.suscom.net [216.45.135.174]) by smtp2.suscom.net (Postfix) with SMTP id A4CE91CD853; Fri, 29 Jul 2005 06:53:42 -0400 (EDT) Message-ID: <42EA0CA7.8080605@bsdhacker.org> Date: Fri, 29 Jul 2005 06:01:59 -0500 From: uidzero User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050725) X-Accept-Language: en-us, en MIME-Version: 1.0 To: ray@redshift.com References: <3.0.1.32.20050728013152.00a4d188@pop.redshift.com> In-Reply-To: <3.0.1.32.20050728013152.00a4d188@pop.redshift.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at suscom.net Cc: freebsd-amd64@freebsd.org Subject: Re: Benchmarks: AMD64 vs i386 on Dual 246 Opteron X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2005 11:02:06 -0000 ray@redshift.com wrote: >Freebsd-AMD64 list: > >I recently completed benchmarking an evaluation server provided to us by our >hardware vendor in order to see if switching our cluster from Xeon based >machines to AMD based machines was worth while/cost effective > >The machine provided was a Dual Opteron 246 using the Tyan S2881 motherboard. >It had 4GB or ram and included a single SATA hard drive. > >I initially loaded FreeBSD 5.4 AMD64 on the machine, recompiled the kernel, etc. >and applied all the normal tweaks to apache, PHP, etc. The machine, while >faster than our single 2.4 Ghz Xeon's, wasn't all that much faster (maybe only >10 to 15 percent). > >After speaking with AMD and doing further benchmarks, I was about to give up on >AMD and return the machine. However, at the last minute, an engineer from AMD >suggested that perhaps loading the 32 bit version of FreeBSD (aka i386) might >improve performance, since it was possible that the overhead from 64 bit >pointers was causing the machine to run slower than expected. He also explained >that the AMD should be running about 3 to 4 times faster than the single Xeon. > >While this sounded like a long shot, I loaded FreeBSD 5.4 i386 on the machine >and after applying the exact same configuration to the OS, Apache, PHP and >MySQL, re-ran the benchmarks. Much to my surprise, just changing the OS from 64 >bit to 32 bit caused the machine to double in speed. The results are attached >in an Excel spreadsheet. So the exact same machine, running the identical >configuration, performed roughly twice as fast when running FreeBSD 5.4 i386 vs >FreeBSD 5.4 AMD64. Something about this seems so wrong to me :-) > >In speaking with one person off the list here, I was told that the FreeBSD AMD64 >branch has actually been cleaned up substantially over the i386 code. So >naturally I was expecting much better performance from a 64 bit machine running >the AMD64 code than the "older" i386 code. I had also originally expected that >since this branch [the AMD64 branch] was specifically built around the AMD >CPU's, that it should run the best (and thus the fastest) on the AMD opteron >CPU's. However, just the contrary turned out to be the case in benchmarking. > >I'm wondering if anyone has any comments or thoughts on this? The attached >benchmarks show transactions per second across localhost using Apache AB on the >same machine. The first tests are with plain text files from 64 bytes to 50K in >size. The next group is using a small and medium size PHP program. The final >set relate to MySQL inserts, selects and updates. As you can see from the data, >the exact same machine runs about twice as fast just by switching the OS from >AMD64 to i386. But why? > >The only answer I have so far as to why this may be the case is that perhaps >i386 uses 32 bit pointers which the CPU(s) can handle faster (thus less overhead >for the CPU). But it still seems odd to me that if FreeBSD AMD64 is written >specifically for the 64 bit CPU, why doesn't the machine perform better when >running it? > >I'm also wondering if there is a compiler switch on AMD64 that could be used >(perhaps in /etc/make.conf or something) that would force the AMD64 version to >run in 32 bit mode only - since that would be an interesting comparison as well. > >I welcome any/all comments, suggestions, insight. > >Thanks. > >Ray > > Good morning. I'm very NEW to the list and NEW to 64bit systems. I installed 5.4-R (i386) on my dual AMD64 Opteron 2.0g (1mb cache) with 1g ram and 4 X 160 (raid10) sata drives server. I was blazing fast, I think the first kernel recompile was 10 minutes or so "time make buildkernel KERNCONF=KERNEL" I was shocked to see how fast it was. (I know you tested with php/etc...) Well, like an idiot, I was thinking I could use the i386 install disc to get the 64bit. Eh.. no go. I then grabbed the boot only 64bit from FreeBSD's ftp site and loaded it. Base install of course. When I did the "first compile" I yet again. was surprised. 6:29:xx!!! Fastest I've ever seen a kernel compile and that was with ONE cpu. (Had to compile in SMP.) Man, never had a system that was this fast. Needless to say, I think the 64bit out performs the 32bit OSes. Then again, I'm not as technical as most of you all are, I'm just chimming in from a "different" side. Please, put me in my place if need be. :) Michael