Skip to content

Switched to nginx

by Julien on December 28th, 2011

I have recently switched my http server from Apache to nginx. The switch was mostly painless thanks to the good documentation available on the nginx wiki.

I have been able to move all my public virtual hosts, and have already noticed the improvement on how fast the pages load. Here is a sample graph of the disk I/O rates of my linode showing before/after the switch to nginx:

I only had an issue with StatusNet due to the default behavior of spawn-cgi to not spawn any PHP child except if told otherwise. I also had to fix the OpenID plugin for WordPress, as per this commit.

For now, I keep apache running for the DSPAM Web UI, which requires suexec. I know I can easily run the CGI through a different user, but still have to polish my setup for FastCGI.

From → Weblog

4 Comments
  1. Dennis Jacobfeuerborn permalink

    Can you elaborate a bit on your nginx configuration. While the processing may be a bit faster it is not clear why the disk i/o pattern would change so much after all you are still serving the same content right?

    • Julien permalink

      I/O rate is not the only pattern that has changed, but the graph was the clearest to show here. I serve the exact same content and haven’t done any specific optimizations on nginx configuration (yet). I would say this drop is due to less swapping.

    • Does that mean that I wouldn’t gain much if my system is not currently swapping ?

    • Julien permalink

      As far as disk I/O rate is concerned, maybe not… but RAM & CPU usage are also lower now.

Comments are closed.