On Tue, May 06, 2008 at 04:55:34PM +0200, Marek Podmaka wrote:
> Hello all,
> I just yesterday learned that my Xeons are in fact 64bit, so I have
> few questions about it...
> 1) What is the performance gain between running 32bit and 64bit linux
> on 64bit capable CPU? I'm running Etch with apache+php+mysql. Is it
> worth upgrading?
for most programs, not much. if any.
the main advantage is that each process can have direct access to ALL of
the memory in your system...whereas on a 32-bit kernel (even with PAE),
each process can access no more than (IIRC) 3GB.
the "cost" is that 64-bit apps use more memory than 32-bit apps. but see
my answer to your second point 2 :-) below, you can run 32-bit apps on a
64-bit kernel. you can even run a mix of 32 and 64 bit apps on a 64-bit
kernel. OTOH, i've been running 64 bit for over a year now and haven't
noticed or cared about any addition memory usage....but all my machines
have a minimum of 2GB if not 4GB or 8GB RAM. memory is very cheap. it's
easier and less hassle to just install more RAM than to care about it,
and more RAM is *always* better.
seriously memory-hungry apps (databases, huge number-crunching
computations, video editing, and others) will benefit. others, probably
mysql would probably benefit if your db is large.
a multi-threaded apache may benefit. pre-forking probably not. if you're
running PHP, you're probably not running multi-threaded (anyone know if
php5 still buggy with MT? i've lost track).
ultimately, 32-bit will die....but i don't see that happening for many
years, probably decades. some current, production CPUs are still 32-bit
now, and even when it's no longer in use for general purpose computers,
32-bit CPUs will continue to be common in embedded devices.
> 2) Performance is gained just by compiling the same source code into
> 64bit binary? Or are the main apps (apache/php/mysql) optimized in
> source code to benefit explicitly from 64bit?
some will be, some won't. some will benefit from 64 bit, some wont.
depends on the app.
> 2) Is it possible to run 64bit kernel, but 32bit
> application/libraries/everything? (So just recompiling kernel). If
> possible, is it better than 32bit kernel + 32bit apps?
yes. you can run the debian i386 32-bit distribution with a kernel
compiled for amd64. I do that on some machines, and it works
flawlessly. i also run pure 64-bit on other machines and it also works
flawlessly. by "flawlessly", of course, i mean "no problems specifically
related to running 64-bit kernel or programs"...the usual range of bugs
if you are running a 64-bit amd64 kernel with the 32-bit i386
distribution, then you can also install some packages from the 64-bit
amd64 distribution. so you can run most things from 32-bit userland, and
install a few 64-bit packages (plus required lib64 libraries) that are
known to benefit from 64 bit.
for an existing system that you don't want to reformat and reinstall
from scratch, this is the best thing to do.
similarly, it's also possible to run the 64-bit distro with some
packages from the 32-bit distro. AFAIK, this is mostly done by
people who want to run a 32-bit web browser for compatibility with
some binary-only plugins. and, i guess, also on servers with 32-bit
binary-only proprietary stuff. you just need to install the required
> 3) Is it somehow possible to upgrade the 32bit debian into 64bit?
> Preferably with as little downtime as possible...
well, it depends.
if you just want 64-bit kernel and keep your 32-bit userland, then
it's just a matter of installing a 64 bit kernel. downtime is minimal -
however long it takes to reboot.
if you want to completely convert to the amd64 distro, then you have
to 1. backup, 2. reformat, 3. install from scratch, then 4. restore
your config and data files. IMO, not worth it unless you have some
particular need to do so (if you don't know for sure that you do, then
you almost certainly don't)...you can always convert to pure 64 bit next
time you replace/upgrade the machine.
craig sanders <email@example.com>
BOFH excuse #73:
Daemons did it
To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org