8

We have a website that is hosted on a IIS 7.5 server.

We have a copy of the same website on an Apache2.2/Centos 6.x server.

On IIS the site is slower (about twice longer or even more) and so far we haven't been able to improve the server response time and/or the site speed in general (frontend and backend).

I don't know about IIS, so it's been complicated to know what to do (for me).

So far we have tried:

  • Some MySQL tuning
  • Enabling Gzip compression without success.
  • Jotcache extension (it works but the website is still slower than on apache)
  • Disabling or uninstalling unneeded extensions.
  • JCH Optimize pro
  • No PHP Cache (any ideas?)

My guess is that we need/should work on the server/php/mysql configuration, however I don't know if there is anything special that we should do to improve performance on IIS and make it as fast as possible as the one on apache. What can we do to improve the performance on IIS ?

Right now our server response time is longer than 1.5 seconds on the IIS website and about 0.4 seconds on apache.

3

Be aware that PHP is generally slower under Windows than under Unix-like operating systems. Things have gotten better with newer version (update!) but there's still a measurable difference.

That said there are two big steps to take when optimizing your servers PHP performance:

  1. Use FastCGI

    While fpm only works on Unix, FastCGI also works with IIS under Windows. Here's a tutorial from Microsoft itself on how to do it: http://www.iis.net/learn/application-frameworks/running-php-applications-on-iis/set-up-fastcgi-for-php

  2. Use an Opcode cache

    Again Microsoft has you covered with the WinCache extension.

If you still have performance issues after these steps I recommend profiling both the Windows and the Linux version. You can use either xhprof or Xdebug. Try to find out whether you have a problem with PHPs performance or MySQL. Another test you could do is serving both copies from the same database server (needs to be a third server). That will quickly tell you whether you have a PHP or a MySQL problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.