Another whirl with FreeBSD

Oliver Fromme olli at
Wed Oct 11 11:14:51 UTC 2006

Heinrich Rebehn wrote:
 > > [i386 vs. amd64]
 > Overhead ?? Would this mean that the 64 bit version will run slower?

It depends.  Most applications will run somewhat faster,
but there are cases where you might get a small slow-down.

On 64bit platforms, some data types (such as pointers)
require twice as much memory as on 32bit platforms.
Programs that use many of those data types will require
more RAM (and possibly a larger cache size to fit their
main working set).  Also, amd64 code tends to be a bit
larger than i386 code, so it also requires more RAM and
more cache.

If your RAM and cache sizes are sufficiently larger for
the type of applications you run, then amd64 will give
you more speed, mainly for two reasons:  First, some
operations are faster if they can be executed with native
64bit registers (for example, atomic operatins in the
kernel that require locking when split into 32bit pieces).
Second, amd64 has twice as much general-purpose registers,
which gives the compiler more and better opportunities for
optimization, e.g. holding variables in CPU registers.

On the other hand, there are still quite some ports that
are not 64bit-clean.  If you need one of those, you'll
either have to wait for a fix, or fix them yourself, or
look for a different software to do the job.  I think there
are also some FreeBSD drivers that won't work with more
than 4 GB of RAM installed, but that problem is independent
from amd64:  they will also break if you run i386 + PAE.
(I'm not 100% sure about the latter, though ...  Someone
please correct me if I'm wrong.)

If you are a developer who compiles a lot, it might be
worth noting that gcc compiles for i386 faster than for
amd64.  That's because of the different code-generating
backends and different optimizer behaviour.

Personally I recommend amd64 instead of i386 in either of
these cases:

 - If you absolutely need 64bit support, e.g. for process
   address spaces beyond 4 GB (you don't have to have more
   than 4 GB of physical RAM for that).  You don't have
   much of a choice in that case anyway, because PAE does
   not increase the maximum address space beyond 4 GB.

 - If you're sure that you won't need any software that's
   not 64bit-clean, and you have tested the applications
   that you're going to run will benefit from running in

Otherwise install FreeBSD/i386 and be done with it.  You
might avoid some potential trouble, and you probably won't
waste a significant amount of performance.

Just my 2 Euro cents.

best regards

Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD:
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"Python is an experiment in how much freedom programmers need.
Too much freedom and nobody can read another's code; too little
and expressiveness is endangered."
        -- Guido van Rossum

More information about the freebsd-stable mailing list