32-bit vs 64-bit Performance Advantages on LAMP Server?

Posted on 2006-05-07
Last Modified: 2013-12-06
64-bit processing offers performance advantages to the standard 32-bit processors and because of this, we're considering using the AMD64 Opteron processor on our newest webserver.  However, I've read of people having headaches on the 64-bit platforms.  Do the performance advantages outweigh the headaches?  This webserver-to-be will be running Red Hat Enterprise Linux 4, Apache 2.2.2, MySQL 5.0.21 (95% of MySQL's use is reads) and PHP 5.1.4 (limited use of two other applications and  Probally use RAID 1 or RAID 10 depending on the $$ budget.

Three questions:
A. What performance advantages are we going to see using 64-bit processing on the Opteron over just using a standard 32-bit processor.
B. How much headache can we expect supporting this beast if we use dual-processor Opterons?
C. Bottomline, would you suggest we go with 64-bit or 32-bit?

Here's the research we've already done:
1. MySQL runs faster on dual-core Opteron >
2. Limited support for 64-bit platforms >,2000061702,39241928,00.htm
3. Limited driver support for 64-bit platforms >
4. MySQL doesn't run significantly faster on 64-bit >

Question by:Geoff Millikan
    LVL 14

    Expert Comment


    In order to make use of the 64-bit processing, you need to install 64-bit OS and run application specifically compiled for the 64-bit processor.

    In the current time, 32-bit OS and applications have been very stable since the 32-bit processor has been around for more than 10 years. 64-bit OS and applications, have more chances to produce core dump (abnormal termination), ie less stable compare to their 32-bit counterparts. Running 64-bit on dual-processor, has tendancy to get core dump more often.

    In the current time, OS and applications released their 32-bit version first, followed by their 64-bit version after some time. This situation includes bug-fixed, security-fixed, updates and upgrades. If a problem has been identified, you'll probably have to wait longer for the solution to be released.

    Yes, there is limited support. Many applications only have 32-bit version, and not yet release their 64-bit version. If it is a driver or library, there will be interoperability problem with 64-bit applications.

    Currently, my servers are running on SMP 64-bit processors, but I installed the 32-bit OS and applications.

    My advice:

    You can try installing the 64-bit OS and applications on a test server with SMP 64-bit processors, test on it thoroughly with stress. If it is working fine, then you can opt for it. Otherwise, stay with the 32-bit world for a little while.

    LVL 3

    Expert Comment

    We are using 64 bit centos right now, I don't see many performance increase, the only think that I found are 64 bit linux increase maximum open files, support bigger memory and support more partition size, anyone maybe willing to add??

    Author Comment

    by:Geoff Millikan
    fajar79, it sounds as though running a 64-bit OS has very limited advantages to someone running a web/database server?

    ppfoong, if fajar79 is right, and there's very limited upside to running a 64-bit OS, then it seems like there's no reason to go through the effort of stress testing, right?

    Anyone else?  I'm aware of all the theoretical advantages to using a 64-bit OS - getting past the 4GB memory limit, etc.   But I'm not asking about theory here, I'm asking, "IS there any real life data that shows that a 64-bit operating system on a LAMP (Linux/Apache/MySQL/PHP) web server increases performance and by how much?"   From the limited amount of performance stats I've seen, there's no advantage.  But I'm having a hard time believing this since MSFT, Mac OS X, Solaris, Red Hat, Ubuntu, CentOS, SUSE all have invested the resources and the long term support personnel to make 64-bit OS'es.  There must be a reason but all I read is people saying things like, "...while 32 bits are good, 64-bit operating systems are better..." like in the following article however, there's no performance stats to backup their claim.

    LVL 3

    Expert Comment

    O yea, just another find, i'm compared between apache and lighthttpd, the strange, i can't get over more than 600 request per second, while with lighthttpd, i can get more than 1500 request per second with the same php script(just phpinfo() inside( 2GB memory).
    LVL 4

    Expert Comment

    64 bit will always be a trade off. On the one hand you get larger contiguous memory space, bigger machines in general (logically) and other advantages for large systems. However there is a downside. For example, you are always moving 64bits of data around, even if you don't need it. Think about how much of the data, code, instructions, etc. will be 32bit (or less) in size. you still move a 64bit wide data each time. If the same hardware and data path was moving purely 64bit information, it would be twice as fast.
    There were some pretty interesting studies done by IBM and others some years back when the midrange systems moved to 64bit (ie AS400 etc) that showed this problem. This is why many systems used a pseudo 64bit system with portions that were 40bit.

    At some point in the future, hardware, software, OS's will be fully optimized to make 64bit an advantage, not a disadvantage as far as performance. However, we are not there yet. That said, Linux is far and away ahead of Windows in the optimization process, and Linux OS's in general run much faster on 64bit. Keep in mind that different Linux distro bundlers are also at different points in the optimization process. I personally don't think RH is at the peak of that process. CentOS, SuSE, and a couple others are probably more highly optimized and debugged on x86_64.

    I have tested SuSE on Opteron and found that yes, some apps are not there yet as far as availability, and compatibility. However, the compatibility libraries and system are pretty good and transparent. Also, the main area of developement that is lacking is in desktop applications, multimedia, etc. All server applications that I needed are all supported in SuSE. YMMV.

    As for performance, our system, running basic server apps (SAMBA, Apache, PHP, MySQL) we never saw any performance degradation. at worst it was the same, in other cases it was faster. pretty mixed bag.

    All that said, I can't see a reason NOT to deploy 64bit, as long as you do a test server and verify compatibility and stability. Even if it's not faster now, it will only get faster as upgrades come out that are better optimized (and as gcc gets better at optimizing for it).

    The Opteron is a sweet server processor in my opinion, and in my testing, and we've been very happy with 64bit Linux (SuSE) on it.

    LVL 4

    Expert Comment

    Oh yeah, real dual's....
    No problem there either, but again, different distro's make different kernel patches etc., so YMMV.
    Given how cheap SMP is these days, it's worth the price. It makes a serious performance increase in general.
    If you have budget issues, go dual core.
    I recommend SMP in almost any situation. It makes a real, overall performance improvement in almost any situation. Though again, this is HW, OS, Kernel, and application related. I have used it on my desktop machine since kernel 2.2.x and even then it was worth it.
    Windows, not so much, but getting better. Kernel 2.6.x, very nice.  


    Author Comment

    by:Geoff Millikan
    Tachyon_1, thank you this was really helpful.  I got two things from what you wrote, "SMP's are worth it - they make a real, overall performance improvement in almost any situation" and "Using a 64-bit OS may or may not give better performance depending on the application."  I'll be awarding you points for this but before we close this out..

    Does anyone know of benchmark results that show MySQL or Apache with PHP showing "here's how fast it was on 32-bit and here's how fast it was on 64-bit."   I appreciate Tachyon_1's encouragement to go 64-bit because in the long run "it will only get faster as upgrades come out" however, unless there's immediate benefit, it's not worth my time learning and getting a new thing up and running.

    Anyone else?
    LVL 4

    Accepted Solution

    "...however, unless there's immediate benefit, it's not worth my time learning and getting a new thing up and running."

    Last first, there's not much new to learn. It's much less of a hassle than say moving from x86 Linux to PPC linux. And if you are using the same distro you did as 32bit, then the differences will be very small. Worst case, you may find yourself compiling a few small apps. nothing tough though, and LAMP is pretty much out of the box.
    As for immediate benefit, no one out there really _can_ give you a useful benchmark. You need to run a test system yourself and see if you you really need to know if there will be a benefit. Otherwise, anyone else's results will be specious to you depending on such factors as, Linux distro, motherboard, chipset, hard drive (brand, model, interface, configuration), applications. etc. you get the point.  There are too many factors that may skew the results either way. Only your own HW is a useful test.

    Again, even my own comments may or may not apply to your situation. I do not use the same distro as you for one, so that alone may radically change the results. I am sure we don't use the same hardware or server configuration either. Not to mention our dataset is certainly different.

    This situation is perfect example of why test systems are important and useful. If you really need to know, it's the _only_ way to tell, period.
    Sorry, that's a lousy answer, but it's the most truthful.

    But, taken with a grain of salt, given that you'll likely be using the same 64bit hardware either way, you probably don't have much to loose.
    If you install the system with a 64bit OS, configure your apps, and properly document your configuration, and save the related config files etc. then even if it doesn't work out, you can easily switch to the 32bit version of the same distro, and nearly drop in the config files and data and your are off to the races in a short time.

    My experience with the AMD 64bit technology, using SuSE Linux, has been entirely positive on the server side. It's only been a challenge on the desktop, and even there, not a big challenge. I have nothing but praise for both AMD and SuSE (who developed the first 64bit linux port with AMD).


    Good luck.

    Author Comment

    by:Geoff Millikan
    "...there's not much new to learn..."

    Even if there's nothing new to learn, why do it if there's no chance for increased performance?  "Why fix it if it isn't broken?" as they say...  I'm just playing the devil's advocate here.  I really do appreciate your time in relating your experiences.

    " one out there really _can_ give you a useful benchmark..."

    Yes, I see your point... the distro, server config, and hardware all make significant impact into the effects the 32 and 64 bit OS's will have on performance.  Still, I wish I there was any kind of data from any kind of setup showing the actual performance differences of Apache and/or MySQL between 32 and 64-bit operating systems.  I just cannot justify the time it takes to load the 64-bit OS and then run benchmark metrics, then load the 32-bit OS and then re-run the same metrics and see which configuration is more efficient.  Since there's no published benchmark data for anyone doing a test like this already, it seems reasonable to assume that 64-bit _isn't_ significantly better, right?  Otherwise there would be report after report with hard data showing the advantages of running in 64-bit.

    I'd love to use a 64-bit OS on my web site since I like to use cutting edge technology however, at this time, I just can't see the return-on-investment-justification for doing it.  Thank you again for all your time on this.  I'll leve this open for a few days for further comment and all points will be awarded to Tachyon_1 unless someone else can give some hard metrics.
    LVL 4

    Expert Comment

    " seems reasonable to assume that 64-bit _isn't_ significantly better, right?  Otherwise there would be report after report with hard data showing the advantages of running in 64-bit."

    I think the real reason for this has not much to do with lack of data but rather the Microsoft-centric nature of the IT world. Most of the industry as far as magazines and test labs and such are primarily focused on Microsoft server testing and data. And the fact is at this point, Microsoft's 64bit offerings are pretty terrible as far as performance benefit, and optimization for the X86_64 architecture etc. One bias I've noticed in the IT industry is that you hear more about Microsoft's succeses than it's failures while they are quick to play to the negative reports (true or not) of any alternatives.

    Unlike Microsoft that generally does little code optimization for higher end architectures, and then in slow steps. Also only parts of the OS. Much of the OS is after all composed of third party drivers for HW. All of which will be in various states of optimization.
    For example, Microsoft Server 2003, Enterprise Edition is only Pentium optimized.

    Linux on the other hand has a consistent level of optimization not oly in the core OS, but all the HW drivers, daemons, user space utilities, and even the applications (or most of them). This makes for a HUGE advantage for an optimized Linux distro on an advanced architecture.
    I wonder how much performance Windows wastes making the CPU run in compatibility mode, not to mention the major performance hits for the context switches that must be caused by having to switch from x86_64 mode and it's libraries, and compatibility mode and it's libraries.

    Having dual booted plenty over the years, it's been easy to see the advantage of an optimized Linux system on an advanced architecture (eg dual PIII system) over Windows on the same HW.

    Again, I can't speak to RedHat's X86_64 performance/stability/optimization. That's not a bash, I just don't use it beyond our usual ongoing test systems (we test many of the latest distro's and apps to provide data for customers). However, I can say that Linux in general DOES gain performance running in 64bit mode, IF it's well optimized for it. And in general, I recommend it for production use. However, I also recommend that customers do their own testing on their preferred distro/App/HW combo to make sure there are no issues. We have only ourselves completed certifying SuSE Linux, as it's what we use internally. We will be doing others later.

    Either way, I can tell you that the Opteron rocks in either mode, you should be quite happy with it, especially dual core. And in overall, real world server use, it tends to outperfom Intel on the average.

    That's my observation based opinion anyway, for what it's worth.

    Good luck.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now