Windows Hosting or Linux Hosting? Which runs PHP Faster?

This is one of those questions everyone and their brother tries to answer and it seems in the 10 years we’ve been offering web hosting at the question is still the same and the answers are still the same BS 10 year old answers.. Typically you hear responses from the advocates of Linux over Windows such as these:

  • Keep Microsoft for Microsoft and Use Linux for everything else. (yeah those days are over. Unlock the doors and come outside, Y2K never happened and it’s not going to.)
  • PHP is faster on Linux, it’s optimized for Linux and will NEVER run on Windows. I know because I’m a uber-hacker and have my own apartment (in the basement of my mommy’s house.. er I mean my room-mate!)
  • Windows Hosting is more expensive than Linux hosting. (Until it breaks and you need to call support but your site is down for 3 days while you try to get support off some usenet feed… Then which is more expensive?)

Well, I’m a big fan of benchmarking things and just testing this for yourself. Of course ever since my Virtuozzo versus VMware versus VirtualPC comparison where all of VMware wanted to take me outside and have me drawn and quartered, I’ve decided to not post such comparisons. Fortunately for us Joe was kind of enough to run such a comparison (using the exact same machine you VMware fan-boys) and really compare PHP on Windows and Linux as well as ASP.NET on both.  I’m not going to repeat his results you can see it on his blog. But the long and short of it is:

  • ASP.NET rules the world of performance…
  • PHP 5.3 on Windows is as fast or faster than it is on Linux.  Did you hear that? PHP 5.3 on Windows is as fast or faster as it is on Linux.
  • MySQL on Windows is slower than it is on Linux (Which we knew from our own experiences)
  • PostGreSQL is comparable on both.. I never even considered looking at PostGreSQL.
  • the MS SQL PHP driver is slightly slower than MySQL (but version 2.0 is in the works and will hopefully address this).

So there you have it you you whiny little school girls that insist PHP runs like crap on Windows and why would you ever use Windows Hosting for PHP or for anything (I’m not calling out any names but you know who I’m talking to). Microsoft has stepped up and leveled the playing field with PHP.

If you’re curious what work has been done in this area, Mai-Lan from the IIS team has a nice write up on it.

So that’s the word.  Microsoft has recompiled PHP5.3 and helped optimized it for Windows. Now the Windows-Haters will have to find another reason to complain.

Hey to celebrate the increased performance and Joe Stagner  stepping up to show the world that Windows IS good for PHP and doing an informal benchmark on his own. Here’s a coupon code that’s good for 25% off your first hosting term on any shared Windows hosting or Windows VPS hosting package good for the month of August:  JoeRocks25. You can thank Joe for inspiring the great discount and go subscribe to his blog I do!

Leave a Comment

Scroll to Top