Overall I’ve been pretty impressed with the reactions to my first round of PHP/Linux/Windows/ASP.NET performance tests.
I’d like to comment of the comments
First, while I appreciate the enthusiasm of my .NET friends, the point of my exercise was to give me (and other folks at Microsoft) a starting place to understand some things about the performance of PHP on Windows and of ASP.NET.
If your faith in ASP.NET is incrementally sustained by virtue of this data than I’m happy. If I didn’t think that .NET was a as good as or better than any other technology for building web applications then I wouldn’t be working here at Microsoft.
But ….. It is incorrect and naïve to use this little bit of data to discount PHP out of hand.
I have much more work to do and there are many considerations.
- These are BASE performance data. It is unwise to take a little bit of favorable data and use it to make sweeping conclusions.
- There are many more performance factors we need to research.
- PHP as a core technology easily scales out with hardware additions, hardware can often be considered cheap under the right circumstances.
- Though my environment emulates my shared Linux host, enterprises will use op-code caching and we should consider this scenario (test results coming soon.)
My goal isn’t to show PHP on Windows is faster than PHP on Linux – my goal is for PHP on Windows to ACTUALLY BE faster. The same with ASP.NET. These tests have provided useful data to some of our internal feature guys already and they are taking action as a result.
Here are some general statements, assumptions, etc and my responses.
- “I would utilize ASP.net simply because I like the Visual Studio IDE” – I personally think Visual Studio is far and away the very best, most productive developers IDE ever made. But, there are some pretty good ones for PHP. I use Zend Studio, PHPEd, Komodo, Delphi for PHP and all are great. I loathe Eclipse, but Zend has done a good job extending it for PHP Developers.
- In regards for requests to compare the performance of Classic ASP to ASP.NET – No thanks !!!!! Classic ASP is not nearly the development technology or EITHER today’s PHP or ASP.NET. To do a comparison is to suggest that folks might do new development in Classic ASP and I couldn’t recommend more strongly that you move n from Classic ASP.
- 32 bit versus 64 bit ? – The nature of these tests would likely not show any statistically significant differences by the additional address space of 64 bit. In future tests where I add load simulations, I will add 64 bit scenarios to the tests.
- “PHP is ugly like hell” – Oh, I beg to differ. Classic ASP was MUCH uglier !! You can write terrible and ugly PHP code. As you can write terrible and ugly C# and VB code. On the other hand, you can write very elegant C++ style code in PHP. It is completely a factor of the developers skills and attention to detail.
- Adding Apache on Windows to the tests. – No thanks. Apache is THE server on Linux but IMO, you’re missing out on a TON of opportunity if you don’t use IIS 7.x on Windows !
- “Adding a XAML/Silverlight comparison would be a good idea.” – This would be interesting, but a little out of scope. First, the tests would only be interesting if we compared the performance of logic that could be run EITHER server or client side. Then, in addition to the server side execution performance I would need to duplicate the tests in Adobe Flash and JavaFX in order to be really meaningful. I’ll add it to my list for a later set of tests.
- “Is there a way to improve the performance of the file copy test on Win2k8 ASP.Net 2 without compromising security?” – Probably not. I think this has to do with the ACL system used by Windows Server. I might test the performance reading and writing files through streams to compare the performance. Some things will just be faster on one side or the other; luckily, mass programmatic file copy operations aren’t too common for web applications.
- “PHP has always been, and will always be, tailored to semi-professional environments.” – No disrespect, but this is simply bullshit ! There are MANY professional / high quality sites and applications written in PHP and there are many PHP developers who’s work I greatly respect. Professional / Not professional is a factor of the developer’s skill, not PHP or ASP.NET
- “But Linux is Free” – Well……. This is a great topic for discussion. I’ll get to it in a bit
- “I don’t think it’s fair to compare PHP without an opcode cache… You can’t compare an opcode cache to page caching. .Net has the benefit of using bytecode, while PHP has to parse the file and "compile" for each page request. So you deny PHP the advantage that .Net has” – I agree this test is necessary for completeness, but I’m not sure the logic holds. I tested PHP as you would download and install it. My shared host does not have op-code caching installed. The fact that it’s built in to ASP.NET and not PHP doesn’t make my test unfair, it’s MISSING from PHP. That said- the request is valid and I’m working on it.
- “Please add Perl, Python, Ruby, etc.” – Someday I might, but these web development options are relatively unimportant (to me) since the developer market share of these are still just a tiny fraction of that held by ASP.NET and PHP. (I am more interested in JSP though.)
- “if you get around to doing that kind of test, you should probably account for the fact that it typically takes hours to set up and configure a Windows server (while most Linux sysadmins can do it in under 10 minutes).” – This just isn’t true. EXPERIENCED Windows and Linux Admins can do equally impressive things deploying servers within their respective areas of expertise.
- “Saying that PHP isn’t a "professional" language is just dippy, since nearly all of the largest web sites in the world today were built with PHP.” – It is dippy, but it’s also WRONG to say that “nearly all” are built with PHP. Some are, some aren’t.
- “Why didn’t you use Zend Page Cache to negate that effect to bring it to an equal footing with ASP.NET?” – As mentioned above. It’s not part of core PHP, the exercise wasn’t to do a bunch of custom stuff to get PHP to be as fast as ASP.NET, though as I mentioned, I’m going to work on an test with Op-Code caching.
- “What about Mono” – Email Miguel, he probably already has some relevant data.
- Exo – you’re a jerk
- “Win + ASP.NET + MySQLWin + ASP.NET + PostgreSQL” – Yep !!! These are in the works !!
There were another couple of interesting comments ….
“I’m not a developer I’m a user.”
“most of these (PHP) projects are perfect examples of heavy spaghetti, anti-pattern software.”
From a pure technology perspective, I find .NET to be far more powerful than PHP, but that doesn’t mean PHP is not powerful.
IMO, PHP’s power is in the network of applications and frameworks that are available.
Though many PHP “users” are “real” developers, many are as the commenter suggests, “Not developers, but rather users”.
As to the second quote, sure, I’ve looked at lots of ugly PHP code. I’ve done lots of work with PHP-Nuke and PHPBB and neither is coded in an elegant or OOP way.
But, both those applications ROCK !!!! Lots of the PHP-Nuke code is UGLY, but it works !!! (A lot of the world’s business systems are still running on really UGLY COBOL code.)
I used PHP-Nuke for years and made a habit of sing a code formatter and cleaning up modules or pages as I “touched” them.
Though both PHPBB and PHP-Nuke are “out of favor” I still use and love them. I also now use and love Drupal, Joomla, SMF, and VBulletin, as well as many others.
THIS !!! Is why I’ve been on this 8 year mission to get PHP on Windows working well and to get PHP and .NET working together !! I wanna use PHP applications and have access to the amazing power that is .NET
So, that’s a lot of rambling, but there is one more topic that I deferred higher up in this text.
TCO ! ?
Craig asks a GREAT question – “ …. isn’t it TCO that counts?”
Total “cost” is a factor of SO many thing.
Microsoft can convincingly and truthfully explain to you why .NET offers that best TCO ratio !!!!
The problem is, Zend can truthfully explain to you why PHP offers that best TCO ratio.
Everyone who dislikes the state of ANY technology comparison bails out to fuzzy TCO claims.
I’ll get to TCO data that is perf/scale based (after much more testing.)
I’d be very interested in seeing any REAL data either way.
In any event – thanks for reading. More to come !
[ You can read the original post HERE ]