Increasing Nginx Performance With Thread Pooling

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, June 18, 2015

Follow me on Twitter as @mattiasgeniar

Fascinating stuff.

The result of enabling thread pooling and then benchmarking the change shows some pretty impressive performance gains.

Now our server produces 9.5 Gbps, compared to ~1 Gbps without thread pools!

and

The average time to serve a 4-MB file has been reduced from 7.42 seconds to 226.32 milliseconds (33 times less), and the number of requests per second has increased by 31 times (250 vs 8)!

The title of the article seems wrong, as a best-case scenario has the possibility to increase bandwidth 10x and the time to serve a file is 33x faster (under the best of circumstances).

Worth a read and definitely worth a test in your lab: Thread Pools in NGINX Boost Performance 9x!



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.