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

Re: 64 vs 32 lenny



On Fri, 20 Mar 2009 18:54:58 -0500
Mark Allums <mark@allums.com> wrote:

> Mark Allums wrote:
> > prad wrote:
> >> i've recently returned to debian on a amd64 3400+ machine with 1G ram
> >> in it.
> >>
> >> i am running the 32bit version of lenny.
> >>
> >> would there be benefits to use 64bit lenny instead?
> >>
> >> in the archives, i found posts suggesting there is no benefit unless
> >> you are using 64-bit apps that require extra processing power like
> >> number-crunching.
> > 
> > 64-bit is the future.  Everyone will run it eventually.  Except older 
> > computers and possibly embedded processors, such the ones that power 
> > .mp3 players and the like.  ARM, Coldfire, SH-1, and so on.
> > 
> > Right now, there is no hurry to move from 32- to 64-bit, especially if 
> > your machine has 4 GB or less.  Or you need the 64-bit architechture 
> > itself, for the extra registers, whatnot.  Some number-crunching 
> > applications can benefit from it.
> > 
> > A downside is 64-bits not only allows more memory, it requires it. 
> > 64-bit pointers vs. 32-bit pointers.  Excuse me, *addresses*.
> > 
> > I recommend 64-bits for new installs, but for existing setups, there is 
> > no need to update, unless you have specific needs.
> > 
> > Mark Allums
> 
> 
> Oops, make that *3* GB or less.  The PC architecture allows more, but 
> while 4 GB fits into 32-bits, the video card and other hardware is 
> memory-mapped into the upper GB, so the 4th GB of physical memory must 
> be remapped above the 4 GB line.  In theory, with PAE segments you can 
> address that memory with a 32-bit OS, but in practice, 64-bit is required.
> 

It's not so much the video card any more (used to be that the video card was
mapped into this space but it was a long time ago in the days of far pointers
and memory size less than single digit megabytes).

It's the kernel memory that is mapped there. By default the application has a
four giga memory space under 32bit, two of which are actually used by the
application and two for kernel mode. This is used to reduce overhead during
context switching between usermode and kernel mode.

You actually need a patch to change this to a 1:3 ratio instead of a 2:2 ratio.

The standard recomendation in this case is to use amd64 for memory > 2gb. Like
you said, theoretically it is possible to solve this differently but it is very
inefficient

As for other the advantages and disadvantages

1. amd64 has more registers, mostly useful for sse instructions and thus can
benefit number crunching applications
2. on the other hand it uses 64 bit pointers (addresses) and thus usually uses
about 30% more memory than 32bit applications. This means more pages and thus
less spatial coherence which results with less cache coherence, actually
hurting performance.

So unless you do a lot of sse based number crunching or have more than 2gb ram
you are still better off using i386 over amd64 for regular desktop usage 9
times out of 10 at least

BTW, you can always install a amd64 kernel with i386 userspace to access more
than 2gb for the system (although single applications will still only be able
to use 2gb each).

As for applications, the only one I'm missing at the moment is a 64bit version
of skype (you can still run the static version), most everything else has 64
bit versions I believe (at least things I use)

> Mark Allums
> 
> 


Reply to: