Windows Web Hosting, Web Technologies, etc
Posts tagged php
Windows Hosting or Linux Hosting? Which runs PHP Faster?
Aug 6th
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!
There’s a new database option available for PHP, It’s called SQL2005
Oct 10th
Ever since Bill Staples first blogged about the collaborative work Microsoft was doing with Zend to improve PHP stability and performance on IIS, I’ve been giddy as a school girl. Having run a core component of the AppliedI.net infrastructure that makes use of PHP and MySQL on IIS7 and making use of FastCGI and the new Windows CGI friendly DLLs/builds it’s made me even more giddy, PHP simply zips along these days on our windows servers and I can’t wait to move my blog to a box running FastCGI. This week at ZendCon Bill announced some more good news: SQL Server 2005 Driver for PHP.
From the Microsoft Data Blog:
The PHP Driver will deliver an API designed-to-enable reliable, scalable integration with SQL Server for PHP applications deployed on the Windows platform. Zend and Microsoft are working together with the PHP Community to ensure that the SQL Server 2005 Driver for PHP is a great offering for PHP developers and part of Zend’s core PHP offering.
So that’s the good news, the bad news is we have to wait one more day, because the download won’t be available until October 11th at: http://www.microsoft.com/sql/technologies/php/default.mspx