From owner-freebsd-amd64@FreeBSD.ORG Wed May 25 17:51:08 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 BCF0416A41C for ; Wed, 25 May 2005 17:51:08 +0000 (GMT) (envelope-from gabor.kovesdan@t-hosting.hu) Received: from viefep12-int.chello.at (viefep12-int.chello.at [213.46.255.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7F6043D49 for ; Wed, 25 May 2005 17:51:07 +0000 (GMT) (envelope-from gabor.kovesdan@t-hosting.hu) Received: from [80.98.207.149] by viefep12-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050525175105.UYIM2846.viefep12-int.chello.at@[80.98.207.149]>; Wed, 25 May 2005 19:51:05 +0200 Message-ID: <4294BB08.3090703@t-hosting.hu> Date: Wed, 25 May 2005 19:51:04 +0200 From: =?ISO-8859-1?Q?K=F6vesd=E1n_G=E1bor?= User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nicolas Blais References: <200505251317.22128.nb_root@videotron.ca> In-Reply-To: <200505251317.22128.nb_root@videotron.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-amd64@freebsd.org Subject: Re: amd64 optimized gcc? 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: Wed, 25 May 2005 17:51:08 -0000 Hello, As for the optimization, I'm very interested how fast can be an actual optimized system. The stock release doesn't optimizes too much, afaik it uses -O. I have been experimenting for a while with building the whole system with my custom cflags, and yesterday I succeeded. I managed to build the whole system with CFLAGS=-s -Os -march=athlon64 COPTFLAGS=-s -Os -march=athlon64 I might have used -O2 instead of -Os but not -O3 which made a compilation error. The -s is for srtipping the binaries and libs, because this is intended to be used on a production system, where we use stable software releases, thus we don't need debug symbols And I ripped out the softwares I don't need with macros. (named, sendmail, games, ...) Unfortunately I don't have a machine for testing purposes but I would ty it. If I provide You such a disc would You try it in the same way? I'm not sure it is a working a disc, but it should be. I haven't read that anybody made such discs. Cheers, Gábor Kövesdán Nicolas Blais wrote: >I am developping a software that follows a random()-dependant algorithm which >is extremely cpu intensif. >I decided to run on different platforms to see how it performed based on cpu >and os (in a way of benchmarking) and I'm surprised by the numbers: > >Reference times for benchmark (5e+07 run of the algorithm): > >(FreeBSD/i386) Venice (S939, 512K L2 cache) Athlon64 3000 overclocked @ 2655 >Mhz : 78.3072 s (638511 r/s) > Note: Cool 'n' Quiet! Disabled in BIOS. > Note: 1 G RAM > >(FreeBSD/amd64) Venice (S939, 512K L2 cache) Athlon64 3000 overclocked @ 2655 >Mhz : 71.2521 s (701732 r/s) > Note: Cool 'n' Quiet! Disabled in BIOS. > Note: 1 G RAM > >(Knoppix/i386) Clawhammer (S747, 1MB L2 cache) Athlon64 3200 @ 2000 Mhz : >133.858 s (373325 r/s) > Note: Compaq R3240CA Laptop, Cool 'n' Quiet! forced by BIOS. > Note: 512 M RAM > >(FreeBSD/amd64) Clawhammer (S747, 1MB L2 cache) Athlon64 3200 @ 2000 Mhz : >47.2754 s (1057630 r/s) > Note: Compaq R3240CA Laptop, Cool 'n' Quiet! forced by BIOS. > sysctl hw.acpi.cpu.px_control=-1 > Note: 512 M RAM > >(FreeBSD/i386) Pentium II @ 233 Mhz : 538.136 s (92913.3 r/s) > Note: 192 M RAM > >Not surprising is the Pentium II :). What is surprising is that amd64 FreeBSD >seems to execute code faster than i386 FreeBSD, so I'm wondering if gcc >(amd64) really optimizes code for the cpu. If it is, I would probably move my >httpd server to amd64... > >Also, maybe less surprising is that Knoppix sucks running the algorithm for >some reason and that L2 cache really is a big factor (my Laptop outperforms >my heavily overclocked box). > >Any comments? > >