Author Topic: Q: How does php performance compare with a LAMP stack on identical hardware?  (Read 3286 times)

0 Members and 1 Guest are viewing this topic.

Offline GarrettSerackTopic starter

  • Irregular
  • Posts: 9
    • View Profile
The easy answer is, YMMV.

On identical hardware, the PHP interpreter itself runs in the same ballpark performance wise as Linux.

When requests are processor-intensive, the Windows builds of PHP 5.3.x are really quite good.

When the requests are file-system intensive, the Windows builds of PHP 5.3.x tend to lag behind.

With the availability of the PHP WinCache extension produced by the IIS team (http://learn.iis.net/page.aspx/678/use-the-windows-cache-extension-for-php/) you can take advantage of byte-code caching similar to APC on Linux.

Garrett
« Last Edit: February 22, 2010, 12:09:15 PM by subtalk »

Offline steviewdr

  • Guru
  • Addict
  • *
  • Posts: 1,650
    • View Profile
    • http://sburke.eu
Have ye done much testing against apache and php on windows?

I see the main competition to IIS+php, is Apache+php on Windows.


Offline Kris

  • Staff Alumni
  • Fanatic
  • *
  • Posts: 4,240
  • Gender: Female
  • PHP 5.3 | MySQL 5.1 | Apache 2.2 | Ubuntu 10.10
    • View Profile
    • Flingbits
When the requests are file-system intensive, the Windows builds of PHP 5.3.x tend to lag behind.

Is this something that can be addressed with further enhancement of the Windows implementation of PHP (or IIS), or does this issue run deeper? For example, is this as a result of the way NTFS works?

Offline GarrettSerackTopic starter

  • Irregular
  • Posts: 9
    • View Profile
Have ye done much testing against apache and php on windows?

I see the main competition to IIS+php, is Apache+php on Windows.

I've done a great deal of performance testing with PHP on Windows, both with Apache and IIS. I've also done a lot of comparitive testing on Linux using Apache and Lighttpd.

On Windows, Apache performance is not very good... the APR layer that handles HTTP on Windows isn't built to use the Windows networking stack to its fullest potential.  Bill Rowe (from the Apache Foundation) and I have talked about replacing the APR's HTTP implementation with one that would offer significantly better performance on Windows. We're hoping to get time to do that in the next year or so.

G

Offline GarrettSerackTopic starter

  • Irregular
  • Posts: 9
    • View Profile
Is this something that can be addressed with further enhancement of the Windows implementation of PHP (or IIS), or does this issue run deeper? For example, is this as a result of the way NTFS works?

It's not the result of the way NTFS works. There are a few factors which are contributing to a small overhead per-call on filesystem operations, and unfortunately PHP tends to be very heavy in its use of the filesystem, and so the performance degradation is exacerbated on Windows.

And, yes, it's being looked at... We're looking for ways to optimize this area in order to close the gap on performance.

G

Offline thezodiac

  • Irregular
  • Posts: 10
    • View Profile
The URL redirects to the page of wincache on PHP.net?
The zodiac is calling d(Ô.ô)b

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
That's the extension GarrettSerack speaks of.

Here's one more link:
http://www.iis.net/download/wincacheforphp
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading