views:

65

answers:

2

Hello all,

I am about to buy a server, before I do so, I just wanted to ask the SO community on its thoughts of a 32 bit server or a 64 bit server and its advatnages on a LAMP stack.

1) Is it difficult to install Apache, MySQL and PHP on a 64 bit machine or is it the same as a 32 bit machine?

2) Are there any performance gains of having a 64 bit machine rather than a 32 bit machine when it comes to a simple web application?

Apart from Create, Read, Update and Delete on a MySQL database, my application will be generating png images using PHP.

Just to let you know, there is no point of having a 32 bit OS installed on a 64 bit machine. See this great article.

3) Finally any other benefits or disadvantages of opting for a 64 bit machine?

Thanks all for any insight into this.

N.B. This doesn't belong on serverfault, as I don't have a problem with my yet to buy server. :)

+1  A: 

A few years back, having installed a 64b server could have been risky, because it was new, less tested, and only a few 64b applications were available.

More recently, I had the exact same question a couple of years ago, while installing Redhat and Ubuntu to run Apache, Mysql, PHP on two different servers. The installation of a 64b OS and the various applications went flawlessly, having me wondering and checking if I really installed a 64b version...

The only concern I had (since my main computer is Linux based) was running Flash on Firefox, having to find the 64 bit version of Flash. But it was made available quickly at the time, as a beta, and works rather well.

There is a gain in performance, thanks to the width of the data that can be processed at once by the processor, for instance dealing with 64 bits of memory instead of 32, but that gain is very linked to the running applications and may not be that sensible depending on the data structure.

However there is an important difference: with a 64b OS and hardware, you are not limited anymore to 4 GB of RAM. This was the main advantage on my side.

Please see this link and read also the comments at the bottom.

ring0
A: 

Installation difficulty is no different, use in practice is identical.

The main difference is that you can give more than 3G of memory to each process, which is really important for things like MySQL where you want to allocate heaps of memory.

You should definitely buy some hardware, but don't put it in production - leave it in your test lab and try various software combinations on it.

In general 64-bit code will run a bit slower (it is bigger, and its data structures are bigger, and the cache size is the same), but that could easily be offset by being able to use proper sized caches for (e.g.) mysql.

If you are optimisation-obsessed and really thing you need the extra grunt, it is possible to run 32-bit code on a 64-bit OS.

32-bit OSs CAN use more than 4G of ram (contrary to popular belief) - possibly even in Windows (some versions). We used to run 32-bit boxes with 32G of ram each.

MarkR