Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Aug 2008 09:12:33 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        freebsd-stable@freebsd.org
Subject:   Re: i386 vs amd64?
Message-ID:  <20080808231232.GK64458@server.vk2pj.dyndns.org>
In-Reply-To: <200808081236.m78CagPH015579@lurza.secnetix.de>
References:  <1EE0EC59-C48C-4B07-B08E-77BE388BBDE1@develooper.com> <200808081236.m78CagPH015579@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--cz6wLo+OExbGG7q/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2008-Aug-08 14:36:42 +0200, Oliver Fromme <olli@lurza.secnetix.de> wrote:
>For example, in amd64 mode there are twice as many CPU
>registers available, enabling better optimizations for
>the C compiler.  Furthermore those registers are twice
>as long, which means that 64bit quantities can be handled
>with single processor instructions.

OTOH, this means roughly 4 times as much processor state to save and
restore on a context switch.  It also means that longs and pointers
are 64-bits instead of 32-bits, which makes executables larger (if you
compare executables and libraries on disk between FreeBSD/i386 and
FreeBSD/amd64, the latter are 10-15% larger).  The VSZ of amd64
executables _appears_ significantly larger due to a bug in binutils
and our rtld but this space is never referenced.

>That doesn't necessarily mean that code will always run
>faster in amd64 mode.  There have been reports of certain
>edge cases.  But in general, amd64 code is faster.

As always, the best benchmark is your own application mix.

>Bottom line:  Install FreeBSD/amd64, unless you have
>_specific_ reasons to stay with i386.

Keep in mind that, for most things, FreeBSD/amd64 can happily run
32-bit Linux and FreeBSD/i386 executables (though there's no easy
way to build FreeBSD/i386 executables on FreeBSD/amd64).  This does
not extend to KLDs so 3rd-party 32-bit KLDs (eg the nVIDIA graphics
driver).

--=20
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.

--cz6wLo+OExbGG7q/
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkic0uAACgkQ/opHv/APuIfZmACeJniSOtR+N1249Wb+d6go7M6H
LHQAniwiTItV4IlZ34ZyZLqB4K9sRgdW
=72pY
-----END PGP SIGNATURE-----

--cz6wLo+OExbGG7q/--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080808231232.GK64458>