Production server has 16GB of RAM and a 32 bit OS. Replace with 64 bit OS?
I have a production server with 16GB of RAM that came with a 32bit CentOS installation.
The website hosted on this server is getting increasing amounts of traffic every day, which has led to some some MySQL performance issues. I ran mysqltuner.pl
and got the following messages:
[!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
Can I survive with the 32 bit OS, or do I need have to install the 64 bit version?
You can survive just fine with the 32 bit CentOS install. But, like the warning says, using a 32 bit OS means that MySQL can't actually use all (or even most of) the RAM installed in the system.
Seems like a waste to me. If the hardware supports 64-bit, I'd certainly replace the 32 bit OS with a 64 bit one, yeah. You'd probably want to do some testing first, and/or use a second server to find out what's going to break when you switch OSes, because something always does.
Strictly speaking, you don't need to install a 64 bit OS, but you definitely should. And probably sooner, rather than later, before the RAM limitations of a 32 bit OS start causing you problems.
Maximum virtual address space of a 32 bit binary is 2^32 (4GB) - once you hit this limit, you're going nowhere.
Should you switch to 64-bit? Absolutely.
Not only will you no longer hit the memory barrier, the generic 64-bit instruction set has generally better performance than generic 32-bit (due to the sheer age of x86) and thus, switching to x64 will give gains in terms of both memory and computational speed.
Obviously if you custom-compiled x86 binaries yourself with the arch target of your exact CPU, you could well find that performance compared to x64 is not all that different, however, since you're using pre-packaged CentOS binaries, obviously that's not the case.
Although answer has been accepted, there's a lot of stuff missing from the discussion here.
First: Alexandru does not mention what database engines are running on this machine, nor whether it's a dedicated DBMS server or if it's also running other stuff, nor what size the data is, nor any stats on physical I/O / VFS usage.
For a dedicated MyISAM based server, then you're not going to get much benefit from making more memory addressable. VFS does as good a job of caching the I/O as MySQL can. OTOH if it were innodb - then by golly, yes: the innodb buffer pool on a dedicated box should be around 80% of the phsyical memory on a dedicated machine.
Regardless of which DBMS is used, switching to 64bit has significant a performance benefit when doing comparison operations on the DBMS - how much depends on whether you're doing a lot of hash or b-tree based lookups.
If the same box is being used for webserving, then the big difference will be if you're using a lot of SSL on the box - SSL is all about calculating large numbers - so even without the AES acceleration in recent intel chips there's an improvment there too.