# What's the best way to stress test the performance of a nginx website?

**URL:** <https://www.ruby-forum.com/t/whats-the-best-way-to-stress-test-the-performance-of-a-nginx-website/171113>\
**Category:** NGINX\
**Created:** [June 26, 2009, 4:17pm UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-stress-test-the-performance-of-a-nginx-website/171113 "2009-06-26T16:17:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [June 26, 2009, 4:17pm UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-stress-test-the-performance-of-a-nginx-website/171113/1 "2009-06-26T16:17:19Z")

</div>

I haven’t done stress testing in a long time… so I’m not sure what the  
best tools are, specifically for our nginx site

thanks

---

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [June 27, 2009, 4:03pm UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-stress-test-the-performance-of-a-nginx-website/171113/2 "2009-06-27T16:03:07Z")

</div>

On Fri, Jun 26, 2009 at 5:06 PM, Ilan B.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I haven’t done stress testing in a long time… so I’m not sure what the  
> best tools are, specifically for our nginx site

Rarely will nginx itself be the bottleneck. For example:

ab testing serving a single image will probably show anywhere from  
10,000 - 20,000 req/s, that is because is because after the first  
access, it will be in ram and can be served fast and efficiently from  
there on. However in a real production environment, where you might be  
serving thousands of _different_ files - when the os file cache (in  
ram) fills up, those 10,000req/s will become about 300req/s, and in a  
worst case scenario (where every request is an os cache miss), it  
becomes entirely disk seek bound (which is why SSD hard disk are great  
for this sort of job).

---

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [June 27, 2009, 6:30pm UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-stress-test-the-performance-of-a-nginx-website/171113/3 "2009-06-27T18:30:49Z")

</div>

It depends on what you really want to do.

If it’s just stressing nginx with a unique request, ab should be the  
best option. And I think this is what you’re looking for.

If you want to make some kind of more complex benchmarking, there is  
many tools (free and commercial) for that.

I’ve tested :

- the free jmeter which is good to stress a webserver with differents  
scenarios. The results are good if you keep them simple. Don’t except  
to make a huge bench with complex results easily.
- the commercial qaload which is very expensive and very complex but  
very powerfull. You need to practice to get rid of it
- the commercial neoload which is powerfull and very simple. The  
reports made after are amazing. I’m using it for 4 months and I’m very  
happy with it.

But benchmarking isn’t just easy.

2009/6/27 meto [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [June 28, 2009, 1:38am UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-stress-test-the-performance-of-a-nginx-website/171113/4 "2009-06-28T01:38:10Z")

</div>

Just to clarify, I’m not specifically looking for how Nginx performs,  
but  
rather how our site performs, being that its a dynamic, php site and  
relatively quiet during the summer time (i.e. a good time to test) so  
I’m  
looking for a tool recommendation to simulate load as well as how to  
best  
process that information.

Thank you for the advise, I’ll take a look at some of the tool  
recommendations.

---

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [June 28, 2009, 3:22am UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-stress-test-the-performance-of-a-nginx-website/171113/5 "2009-06-28T03:22:11Z")

</div>

Another free tool of note is siege (it can mimic users’ requests,  
follow links, etc, and is based on httperf, I guess)

2009/6/26 Micha³ Jaszczyk [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [June 30, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-stress-test-the-performance-of-a-nginx-website/171113/6 "2009-06-30T18:52:19Z")

</div>

It is not exactly an Nginx question then 🙂

Something cheap-ish and simple-ish is to create your own scripts to hit  
your  
sites in a way that you know will or will not trigger cache hits and  
expensive queries.

Chuck in some Apache Bench hits and judge the timings yourself…

2009/6/28 Ilan B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
