librelist archives

« back to archive

noob testing with ab2

noob testing with ab2

From:
Paul J Stevens
Date:
2010-12-03 @ 15:04
Hi all,

I'm working my way through the manual - yes I read - and did a simple 
test using ab against the sample.conf

Everything is peachy, with nice response times close to zero. That is 
until I push up concurrency. With

ab -c 200 -n 10000 http://localhost:6767/tests/sample.html

I get typically results like this:

Percentage of the requests served within a certain time (ms)
   50%      2
   66%      2
   75%      2
   80%      2
   90%      2
   95%      2
   98%      3
   99%      9
  100%    620 (longest request)

where the last request(s) seem to take much longer than the rest. Is 
this a known thing? Something to do with that particular config? 
Repeated runs show different results, sometimes without the hockeystick 
curve, but mostly with.

With low concurrencies all response-times are flat around 2ms.

Anyway; love this stuff. Hope I get to play with it a lot more.

thanks,

-- 
   ________________________________________________________________
   Paul Stevens                                      paul at nfg.nl
   NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
   The Netherlands________________________________http://www.nfg.nl

Re: [mongrel2] noob testing with ab2

From:
Zed A. Shaw
Date:
2010-12-03 @ 16:57
On Fri, Dec 03, 2010 at 04:04:13PM +0100, Paul J Stevens wrote:
> 
> Hi all,
> 
> I'm working my way through the manual - yes I read - and did a simple 
> test using ab against the sample.conf

Yay! Too many people don't that's for sure, but they seem to read the
Mongrel2 manual.

> Everything is peachy, with nice response times close to zero. That is 
> until I push up concurrency. With
> 
> ab -c 200 -n 10000 http://localhost:6767/tests/sample.html

Yep, I get that too on Linux especially.  It's partially that I haven't
tuned much yet, and partially that if you slam a server on Linux from
within the same machine then you starve the limited file descriptors it
gives you.

> where the last request(s) seem to take much longer than the rest. Is 
> this a known thing? Something to do with that particular config? 
> Repeated runs show different results, sometimes without the hockeystick 
> curve, but mostly with.

Yep, it's known and I have a few strategies I'll be doing to prevent it.
Mainly things like booting "dead" sockets if the server is overloaded,
rejecting connections when it's overloaded, etc.

One thing to look at though is the various settings your OS needs so you
can thrash the server using your client of choice.  Most of the settings
are summarized well in:

http://blog.urbanairship.com/blog/2010/09/29/linux-kernel-tuning-for-c500k/

So try some of those and see what you get.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] noob testing with ab2

From:
Philippe Marschall
Date:
2010-12-03 @ 15:28
2010/12/3 Paul J Stevens <paul@nfg.nl>:
>
> Hi all,
>
> I'm working my way through the manual - yes I read - and did a simple
> test using ab against the sample.conf
>
> Everything is peachy, with nice response times close to zero. That is
> until I push up concurrency. With
>
> ab -c 200 -n 10000 http://localhost:6767/tests/sample.html
>
> I get typically results like this:
>
> Percentage of the requests served within a certain time (ms)
>   50%      2
>   66%      2
>   75%      2
>   80%      2
>   90%      2
>   95%      2
>   98%      3
>   99%      9
>  100%    620 (longest request)
>
> where the last request(s) seem to take much longer than the rest. Is
> this a known thing? Something to do with that particular config?

Does adding -k make any difference?

Cheers
Philippe