List Info

Thread: Re: 32 or 64 for web server and mysql




Re: 32 or 64 for web server and mysql
user name
2007-07-20 13:08:44
"P.V.Anthony" <pvantonysingnet.com.sg> posted
46A0B6C6.5000803singnet.com.sg, excerpted below, on  Fri,
20 Jul 2007
21:21:10 +0800:

> I going to built a 1U server which will have the
following.
> 
> 1. Apache 2
> 2. Lighttpd
> 3. qmail
> 4. vpopmail
> 5. mysql
> 6. postgres
> 7. ruby
> 8. php
> 9. perl
> 10. tinydns
> 11. pureftpd
> 12. high availblity tools for fail over
> 
> The question is which way to go 64bit or 32bit? Which
more stable? Which
> is better?
> 
> The reason for this questions is that there are some
information on the
> net that says that there is no much difference between
them. Is that
> true? Thought that 64bit is always better.

Generically, 64-bit can at times be worse, because some
things (integers, 
memory addresses, etc) take 64-bits rather than 32, meaning
bigger 
binaries on disk, more memory used, more bandwidth necessary
between disk 
and memory and memory and CPU, larger cache required for the
same effect, 
etc.  Thus, on many archs other than x86, it's quite common
to have the 
kernel as 64-bit to allow addressing larger memory and etc,
but run a 32-
bit userland -- basically everything but the kernel.

On x86, it's a bit different.  32-bit x86 was always
severely register 
constrained, among other things, and one of the improvements
AMD made 
with the 64-bit extensions was that the spec required more
registers.  As 
someone else already posted, this is often a big win on
x86_64 as 
compared to x86 (32), especially when apps are optimized to
efficiently 
use all those extra registers.  The difference the extra
registers make 
is generally way more than the cost associated with the
larger integers, 
so on x86, 64-bit is generally better than 32-bit, even with
the 
additional expense of the larger integers and as a result
binaries and 
etc.

There are additional considerations, however.  The biggest
one is whether 
you'll be running any closed source software.  Often, that's
not 
available for 64-bit, or is available but with less testing
and support.  
Of course, if it's Oracle or the like, they should support
64-bit no 
problem.

On a server, most of the typical 32-bit only binary-only
stuff isn't an 
issue, and if you ARE running any binary-only stuff, it's
far more likely 
to have native Linux 64-bit binaries available and well
supported (xref  
Oracle as already mentioned).  Be sure to look before you
jump, however.

If you are going to be running 100% FLOSS on your server, as
with the 
desktop, things lean rather more 64-bit.

How much memory are you going to be running?  If >3 gig,
you almost 
certainly want 64-bit if you can, as 32-bit gets rather more
inefficient 
at addressing >4 gig.

Also what sort of CPUs are you running?  True AMD64 or Intel
em64t?  True 
AMD64 CPUs tend to be better at 64-bit than Intel, which
still optimizes 
for 32-bit even on their em64t stuff.  If you are running
true AMD64 and 
there's no closed-source-ware preventing it, 64-bit will
almost certainly 
be your better choice.  If you are running em64t, you just
might be 
better on 32-bit, depending on your exact app and load
profile.

Finally... 64-bit /can/ be more secure from a hardware
perspective.  
There's certain features built into the 64-bit extensions
that improve 
resistance to buffer overflows and the like, or more
precisely, compiling 
a hardened profile, as you may be doing on a server, doesn't
cause the 
performance penalty on amd64 (generically, so em64t also)
that it does on 
x86.  If you are going to be using a hardened profile, I'd
strongly 
recommend going 64-bit for that reason.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." 
Richard Stallman

-- 
gentoo-amd64gentoo.org mailing list


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )