Benchmarking Nginx on a prehistoric PIII 500

Thomas iamkenzo at
Sat Mar 15 20:06:35 MSK 2008

Hi guys,

I have spent quite a lot of time benchmarking and modifying values and
all that stuff.

What I can say, is that don't focus too much on req/s, because that
doesn't mean much, pay careful attention to the time taken for each
request (not the average) and also the maximum time taken, in some
cases specially with concurrency, my average was 400ms with a maximum
of 19s, and 4% of the requests were over 1s.

Now, I need your point of view in scaling my server. So it is a PIII
500. I have been adding Thin instances, and playing with the weights,
and nothing changed, I always had the same result. Actually it became
worse as I was adding more Thin instances. The cpu usage was always at
100%. I tested with Mongrel and had the same throughput as well.

With 2 Thin instances, the cpu usage was 50% / 50% and gave the same
throughput. I was expecting to see somewhere around the double...

I also noticed that I had Munin (monitoring tool) working in the
background and eating 40% of the cpu for updating graphs!!! However,
disabling munin didn't give me more throughput.

As I was increasing the concurrency, the best result was still given
with only one Thin instance.

My final server will be more powerful than my PIII, however I guess
that the cpu usage will still be at maximum, so I don't understand the
need to have more than one Thin/Mongrel instance running, can someone
explain me what's happening? Are more than one Thin instance required
only when the cpu is really super powerful, and in such case, the cpu
would be sometimes waiting on Rails or MySQL to do their processing or
disk access?

More information about the nginx mailing list