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

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

On Fri, Jun 26, 2009 at 5:06 PM, Ilan B.[email protected] 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).

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 [email protected]:

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.

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 [email protected]:

It is not exactly an Nginx question then :slight_smile:

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. [email protected]