Why is LEMP 5 times slower than LAMP?

February 26, 2018 3.5k views
LEMP LAMP Stack Nginx Ubuntu 16.04

I read many post on internet that LEMP + wordpress is faster than LAMP + wordpress. I installed lemp + wordpress using guides on digital ocean.

The results = Nginx is five time slower than apache!

I am not able to find a good solution to make lemp + wordpress work as good as lamp + wordpress.

If anyone knows a solution, help is appreciated.


1 Answer

HI! A few years back I was the person developing the DO WordPress one-click image and we had heard the same thing so we decided to do some testing ourselves to figure out whether LAMP or LEMP with a totally default Ubuntu provided configuration would perform better on small droplets.

In my testing I found:

LEMP was slightly slower serving WordPress on the smallest droplet sizes.
LEMP had slightly higher RAM use than Apache (likely due to the separate process required for fpm)

LAMP had slightly lower resource usage by default but seemed to lose this advantage with more connected clients.

My testing was exclusively about the default Ubuntu configurations on the smallest droplets for a very limited use case but in my experience with Nginx, it’s all about how you optimize your configuration.

Have another answer? Share your knowledge.