32bit or 64bit OS?

I'm going to be deploying a few new Linodes this weekend. One web server and one mysql server, should I go w/ 32bit OS for both Linodes? I'll be running centos.

On the web server, I plan on having nginx handle the static files and passing PHP requests to Apache.

14 Replies

@sdotsen:

… should I go w/ 32bit OS for both Linodes?
Yes. 64-bit confers no worthwhile advantages on 'nodes with less than 4GiB of RAM. Databases might run a bit faster, but PHP (in particular, and some other S/W as well) will use more memory.

@pclissold:

Yes. 64-bit confers no worthwhile advantages on 'nodes with less than 4GiB of RAM..
The whole 4GB RAM barrier misnomer thing needs to die.

32-bit Linux kernels with PAE enabled (which all of ours are) can address 64 GB of RAM. However, each process can only address up to $KERNEL_SPLIT of RAM (which is either 3G or 2G per process, depending on 3G/1G userspace/kernel split or the less common 2G/2G split).

I'm sure there are microbenchmarks that prove 64 bit is faster at this, slower at that, etc, but in my experience the real-world performance differences aren't noticeable for generic workloads.

64 bit uses a couple percentage more memory to accomplish the same tasks as 32 bit.

1) If you know you will need a process to address more than 3GB RAM (like a DB server or something), go with 64 bit.

2) If you know you need 64 bit maths (and you'll know), go with 64 bit.

3) For everything else, stick with 32 bit, unless you don't care about losing a few % RAM.

-Chris

Using MongoDB or another massive-memory-mapped-file-based program is another case where you'd want to run with 64-bit, but it's uncommon, so you can fry that fish when the pan comes.

Except for a few instances, such as the ones caker mentioned, I'd definitely recommend 32bit. 32bit can only access up to 3.5GB on most systems, so anything above that normally needs 64bit – I don't know if the Linode kernels are configured to go above those, though.

From personal experience testing from my home computers, 32bit seems to perform better. 64bit is meant to be faster, but a VM is generally slower because it is basically a "fake computer", not a real one. There are some differences between virtualization, which is what Linode is, and emulation (virtualization is much closer to running a real computer via a software program, and doesn't rely on hardware as much for virtualizing the fake machine), but the fact still remains that it isn't a real computer, and will not perform as well as a real computer.

I do realize some computers can be designed with high-performance virtualization in mind, but even with those, I'd still be cautious about 64bit -- since it's meant for better speed, it will try to push the machine to work faster, so generally doesn't work as well in a VM.

@Piki:

32bit can only access up to 3.5GB on most systems, so anything above that normally needs 64bit – I don't know if the Linode kernels are configured to go above those, though.
@caker:

32-bit Linux kernels with PAE enabled (which all of ours are) can address 64 GB of RAM.

@caker:

32-bit Linux kernels with PAE enabled (which all of ours are) can address 64 GB of RAM.

But what if I buy a Linode 131072?

@Guspaz:

But what if I buy a Linode 131072?
I look forward to the day when 128GB VMs become commonplace…

Completely off-topic: It was 12 years ago when I first built a computer with 128MB of RAM. The RAM portion of the BIOS self-check took a few seconds longer than usual, and stopped at 131,072K before moving on to other checks. That's when my brain made a note to itself that 2^17 = 131,072. That number remains to this day the second-largest power of 2 that I can recite from memory. (The largest is 2^20 = 1,048,576 = number of bytes in a mebibyte.)

@hoopycat:

Using MongoDB or another massive-memory-mapped-file-based program is another case where you'd want to run with 64-bit, but it's uncommon, so you can fry that fish when the pan comes.

Yep, I'm actually using MongoDB so I'm going to need a 64bit Linode for that. My Apache will prob stay on 32bit for now.

@caker:

32-bit Linux kernels with PAE enabled (which all of ours are) can address 64 GB of RAM. However, each process can only address up to $KERNEL_SPLIT of RAM (which is either 3G or 2G per process, depending on 3G/1G userspace/kernel split or the less common 2G/2G split).

Is this a limit on the RES (resident) memory, or VIRT (virtual)? I'm looking at a Java process on my server, and it is using 637m VIRT, but only 48m RES. I'm wondering which one applies to the 3GB memory limit for the process (using 32-bit kernel).

@Guspaz:

VIRT, I believe.
it should be virt

Virt is acceptable at the beginning of a sentence.

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