[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: confused about performance



On Thu, Jun 14, 2007 at 09:21:28AM -0400, Lennart Sorensen wrote:
> On Wed, Jun 13, 2007 at 04:40:52PM -0600, Sebastian Kuzminsky wrote:
> > Hi folks, I just bought a pair of AMD64 systems for a work project,
> > and I'm confused about the performance I'm getting from them.  Both are
> > identically configured Dell Dimension C521 systems, with Athlon 64 X2
> > 3800+ CPUs and 1 GB RAM.
> > 
> > On one I installed using the Etch (4.0r0) i386 netinst CD, then upgraded
> > to Lenny.  This one's running linux-image-2.6.21-1-686.
> > 
> > On the other I installed using the current (as of 2007-06-13) Lenny d-i
> > amd64 snapshot netinst CD.  This one's running linux-image-2.6.21-1-amd64.
> > 
> > The one with the x86 userspace and 686 kernel is faster than the one
> > with x86_64 userspace and amd64 kernel.  The difference is consistently
> > a few percent in favor of x86 over x86_64.
> > 
> > My only benchmark is compiling our internal source tree (mostly running
> > gcc, some g++, flex, bison, etc).  We're using gcc-4.1 and g++-4.1.
> > I've tried it with a cold disk cache and hot disk cache, in both cases
> > x86 is faster than x86_64.
> > 
> > I was expecting a win for 64 bit.  What's going on here?
> 
> 64 bit is faster at some things.  For things like gcc you may simply be
> gaining nothing and loosing a few percent due to having to move around 8
> bytes per pointer rather than 4 bytes per pointer.  Certainly on sparc64
> I believe that is known to cause a slight slow down.  On sparc most
> programs are 32bit I believe, with only a few specific ones that gain
> from 64bit (like lots of ram) are compiled for 64 bit.
> 
> Now anything using floating point should gain significantly on 64bit.
> Of course none of your list of tests do.  SSE (the only floating point
> used on x86_64) is much faster than the old stack based x87
> instructions.
> 
> There are also some programs that gain some performance benefit from the
> extra registers that you get in 64bit mode, but for most programs it
> probably doesn't really matter.  gcc may also not be very good at using
> those extra registers yet.
> 
> Of course if you need more than about 3GB ram in your system, 64bit will
> probably win simply by avoiding the (not insignificant) overhead of PAE
> (needed to access more than 4GB address space on x86).  Also if a
> program can take advantage of more than 2 or 3GB ram by itself, on 64bit
> you can use however much ram you have for the application, while on x86
> you are limited to 3GB ram per application.
sounds like a sane thing to do then is to run a amd64 kernel and build your 
apps in 32 bit mode.  They get the advantage of 32 over 64, but you get the 
advantage of having lots more of them running in your 64 bit kernel ?
> 
> --
> Len Sorensen
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-amd64-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
> 

Attachment: signature.asc
Description: Digital signature


Reply to: