LEMP vs LAMP

Interesting results trying to optimise a website for a client.

This is the blitz.io results before and after.

In both cases the website run the same Lemonstand installation.

The before setup had a standard cPanel installation with:

Apache 2.2.25
PHP 5.4.21 with XCache
MySQL 5.0.96
2GB Ram

The after setup has:

nginx 1.0.15
PHP 5.5.15 with Zend OPcache  (running as php-fpm)
MySQL 5.5.39
6GB Ram

There is obviously a lot of difference between the two setups.

In the original setup the cPanel setup made it very hard to optimise the server.

The new setup makes better use of the available vCPUs and allow a lot of fine-grain tweaking (e.g available connections).

It has a lot more memory but it but barely seems to touch it – most likely thanks to nginx’s low footprint.

Still needs a bit of work (getting the odd 502 Bad Gateway now and then) but that’s pretty impressive.

lemp-vs-lamp

2 comments on “LEMP vs LAMP”

  1. Jordan

    I just started using Nginx about a year and a half ago and I can’t imagine going back to Apache. I love how easy Nginx is to configure, and how little memory it eats up (relatively). LEMP stacks all the way!

    Reply
  2. Patrick O.

    I’d include the actual server specs and blitz test settings before drawing much from the comparison. “There is obviously a lot of difference between the two setups.” That makes it hard to separate nginx’s contribution from the extra resources and configuration changes. Also, count those occasional 502s as failed requests so the speed comparison includes reliability.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *