Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance differences running PHP under Windows/IIS 7 vs. Linux/Apache?

There is a PHP application right now on a Linux box running under Apache with MySQL. Since we are a windows shop, management wants to get rid of the Linux box and move everything over to windows. Is there a performance difference between the two platforms? Or, is there any significant difference at all, in terms of performance or management?

like image 347
cdeszaq Avatar asked Apr 28 '09 16:04

cdeszaq


2 Answers

Microsoft had a team help out optimising PHP for Windows, which work is part of PHP 5.3. Some figures I've seen places the performance close to PHP + Apache on a unix system. Before 5.3 (Which means currently, since 5.3 isn't out yet), performance is bad on Windows. I think there are some patches and tricks you can pull to improve it, but it's going to cost you a bit of performance. That may or may not be a problem; People have a tendency to overestimate performance.

Note that there are other reasons to use unix than just performance. Code may not be portable and even though the core php runs fairly ok, you can well get into trouble with php-extensions and third party libraries. No matter how you look at it, Windows is a second-rate system for running php on.

like image 68
troelskn Avatar answered Oct 13 '22 19:10

troelskn


If your application isn't huge or get hit a couple thousand times per second, there's no difference between the two. LAMP == WAMP in php small projects. Just install something like XAMPP if you want your environment to be as close as possible to your existing one but in Windows.

Good luck with your project!

like image 2
Javier Constanzo Avatar answered Oct 13 '22 21:10

Javier Constanzo