LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

Stick to 32 Bit For Your Low End Box

When you go and find a cheap low end Linux virtual server, the criteria usually involve price (very important!), location (for low latency SSH access), virtualization (Xen vs. OpenVZ?), etc. However the “bit-ness” is rarely looked at. Most current Intel and AMD processors can run 64bit instruction sets, and many virtual server vendors are also offering VPSs in either 32bit or 64bit.

However, contrary to conventional wisdom, bigger is not necessarily better. Do you really have a need for 64 bit on your 64MB VPS? Maybe (but not likely), and it will actually be more prudent to stick with the good ol’ 32 bit, because for exactly the same application, it actually uses less memory on 32bit than 64bit!

Currently I’ve got two 64MB Xen VPS — one running 32bit Debian Etch at Virtual-Dedicated.net, and the other running 64bit Ubuntu Hardy at RapidXen. Two have very similar stack — syslogh-ng, xinetd with dropbear, Vixie Cron, Postfix, Lighttpd and PHP. The 32bit Debian actually runs a few more — gld for greylisting and 2x PHP/FastCGI processes (which are at 6MB each). Guess what, I actually have more memory left with my 32bit Debian VPS than my 64bit Ubuntu VPS!

It makes sense that 64bit programs use more memory. Integers and pointers are now double the size. So you are not only allocating more, you also need a bigger stack for bigger pointers. Result? Less free memory for other applications or cache.

You can still make a 64bit 64MB VPS do a lot of tricks, but if the only reason to get 64bit is huge address space + ability to do massive matrix manipulation, then you are going to need a lot more memory anyway.

Meanwhile, for a small web head or a redundant MX, 32 bit ought to be enough :)

LEA
Latest posts by LEA (see all)

3 Comments

  1. Thanks for pointing out. Haven’t considered this point before.

    I once thought 64 bit machines are faster, usually 15%-30% faster than 32 bit ones. But just as you have pointed out, for a 64MB box, the most important thing is save as much memory as possible.

    May 9, 2008 @ 9:38 am | Reply
  2. some things to watch for: First, there is a small performance penalty to PAE. Second, the 32-on-64 stuff (allowing providers to give you 32-bit PAE Xen guests on x86_64 boxes) is only stable with the most recent (domU and dom0) kernels; I notice on mine, the 32-on-64 stuff is a bit flaky on the RHEL/CentOS 2.6.18-53.1.6.el5xen xenU kernels, but it works fine on the 2.6.18-53.1.14.el5xen and above XenU kernels. (both using the 2.6.18-53.1.14.el5xen Xen0 kernel)

    May 10, 2008 @ 1:07 am | Reply
  3. One other thing to be aware of is that Debian takes less RAM to begin with than Ubuntu does. Ubuntu loads in a lot more stuff by default.

    May 24, 2008 @ 11:57 pm | Reply

Leave a Reply

Some notes on commenting on LowEndBox:

  • Do not use LowEndBox for support issues. Go to your hosting provider and issue a ticket there. Coming here saying "my VPS is down, what do I do?!" will only have your comments removed.
  • Akismet is used for spam detection. Some comments may be held temporarily for manual approval.
  • Use <pre>...</pre> to quote the output from your terminal/console, or consider using a pastebin service.

Your email address will not be published. Required fields are marked *