32 vs 64 bit server

Okay, I am new here and considering joining Linode in the very near future, but I have a question (actually I have several).

The linode I have in mind is the 512 with Ubuntu server. During the first months I will probably just play with it (git, svn, file and webserver, not to forget security settings, taking backups) and learn, but later on I would use it mainly as a webserver (apache or nginx, mysql or mariadb) for wordpress based blogs.

If you go for one of the smaller linodes (512, 768 or even 1024) which is the best? The 32 or 64 bit (ubuntu) server version? I have done some reading and it is quite clear which version I should choose when I have 4GB of RAM or more. What are the criteria for either going for the 32 or the 64 bit version when you have (a lot) less than 4 GB of RAM?

thanx

Johan

11 Replies

if you tune wordpress/apache/nginx it's basically serving static html pages the majority of the time through nginx, so 32bit is the best bet.

If you were doing mysql benchmarks and wanted the best performance figures, you would choose 64bit. In real life, either one works well.

The majority of people will tell you to use 32bit. It's slightly faster in most benchmarks run on a linode, and uses slightly less memory.

Either one works well.

The main reason for asking was because I do not know whether a 64 bit server uses more RAM or CPU than a 32 bit. It probably won't matter on dual/quad core with at least 4 GB of RAM, where the 64 bit outperforms 32 bit and 32 bit PAE (~~[http://www.phoronix.com/scan.php?page=article&item=ubuntu32pae&num=1" target="blank">](http://www.phoronix.com/scan.php?page=a … _pae&num=1">http://www.phoronix.com/scan.php?page=article&item=ubuntu32_pae&num=1](), but with only 512 MB of RAM it might be different.

Thanks for the reply.

There is no reason to use 64-bit on a system with only 512MB of RAM. Some things (e.g. MySQL) might run faster on 64-bit, but other things (e.g. PHP) will use significantly more RAM on 64-bit. Why? Because every pointer and long integer uses 8 bytes of RAM on 64-bit, as opposed to 4 bytes on 32-bit. It takes more RAM to store the same data structure in 64-bit.

What this means is that less RAM will be available to be used as buffers and cache, which in turn hurts everything else's performance. On a VPS where disk I/O is the #1 bottleneck, extra RAM is a lot more valuable than raw CPU speed. (That's why all the plans are named after the amount of RAM they provide.) So unless you'll have nothing but MySQL on the server, it's probably a good idea to stick to 32-bit.

32-bit Linode runs circles around 64-bit Linode: http://journal.uggedal.com/vps-performance-comparison

But of course, your mileage may vary.

But for a 8GB Linode, 64 would be best, right? (Running centos + cpanel, with about 100 accounts).

Another complication: some applications (such as MongoDB) require a 64-bit architecture if they're going to store a large quantity of data. Also, if an application wants to address more than 32 bits worth of memory with a single process, it'll need a 64-bit architecture.

With Wordpress + MySQL, neither of these will usually apply. If you reach the point where you're cranking up the MySQL buffers and caches to multiple gigabytes, then you're probably going to be splitting off MySQL to its own pair of instances anyway and can opt for 64-bit then.

New rule of thumb for MySQL+64-bit: you don't need 64 bits until the monthly budget for your database cluster exceeds the capacity of an 8-bit integer :-)

For 8GB you pretty much have to use 64 bit.

@SteveX:

But for a 8GB Linode, 64 would be best, right? (Running centos + cpanel, with about 100 accounts).

Maybe. Where is the 8 GB of RAM being used? If it's 200 prefork'd Apache processes, you don't need to go 64-bit. If you're hoping to have a 7 GB MySQL process (innodbbufferpool_size >= elephant), you'll need to go 64-bit.

Disclaimer: I haven't had prior occasion to consider a web-hosting application on a 8 GB instance.

Depends on where you're going with it. I've got a few 512's currently humming away on 64 bit Ubuntu with the idea that they will get an upgrade to 8Gb memory if things work out business wise, and it saves me the hassle of doing a fresh 64 bit image install.

You don't need a 64-bit kernel to use 8GB of RAM, that's what PAE is for. You only need a 64-bit kernel if you want any individual process to use more than 3GB of RAM (I think Linux uses a 3/1 memory split?), which is pretty unheard of. I could potentially see MySQL using up more than 3GB of RAM (although if I had 4GB of RAM, I'd only want 3GB for MySQL to leave room for everything else and the disk cache), but most other scenarios have you splitting up your memory-intensive things like PHP into different processes, be it because you've got a million Apache processes, or you're using fastcgi.

@Guspaz:

You don't need a 64-bit kernel to use 8GB of RAM, that's what PAE is for. You only need a 64-bit kernel if you want any individual process to use more than 3GB of RAM (I think Linux uses a 3/1 memory split?), which is pretty unheard of. I could potentially see MySQL using up more than 3GB of RAM (although if I had 4GB of RAM, I'd only want 3GB for MySQL to leave room for everything else and the disk cache), but most other scenarios have you splitting up your memory-intensive things like PHP into different processes, be it because you've got a million Apache processes, or you're using fastcgi.

MongoDB :) For web serving needs I've got lighttpd and FastCGI going, so that doesn't require the motherlode of memory, I can run that fine on 128Mb even.

Thing being though, if you plan on running MongoDB as a "serious" deployment (not just for your personal "experiment with Mongo" thing), 64bit is the way to go - it'll save hassle later.

Sure, but are a significant portion of people using MongoDB? I'd imagine most use a basic LAMP stack, possibly replacing the A.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct