Linux MySQL 64-bit – Reasons to Use 64-bit MySQL on Small Databases

64-bitdebianlinuxMySQL

I have a relatively small and happy MySQL 5.1 database living on a FreeBSD 7.1 64bit install. Because of incompatibility with our backup software and FreeBSD, I have to move the databases to a Linux server.

Since we run Debian on everything else here I'm going to settle for that. The big question is if I should run 32bit or 64bit. It's a virtualized enviroment, so hardware doesnt play a role in this.

Will I get any performance gain (or loss) by using 64bit linux+64bit MySQL with little memory assigned (lets say 512M to be extreme)? Should I just use 32bit until the day I need to assign more than 2GB RAM to MySQL (PAE does not help, 32bit MySQL can not use more than 2GB)?

Best Answer

You already answered the question yourself.

If you are 100% percent positive not to grow beyond 2GB of RAM usage in the current hardware lifecycle you can stay with 32bit, when the time comes to replace your hardware you will have to reconsider anyway.

Given the current hardware market I don't see a real reason not to use 64 bit it will be the safe side in case of unforseen growth, that is true for cache as well as real data size. After all a full migration will take somewhat longer than just taking the box down and adding some RAM.

Drawbacks could be that pointers on a 64bit system use about 30% more memory but that won't really hurt you if you really stay on the small side of memory usage, but on the other hand if you grow you will be able to grow more quickly (at least as long as you can stay on the same hardware box)

Related Topic