[AWS] Confirm Apache Bench "weirdness"

Pascal Obry pascal at obry.net
Wed Feb 2 11:59:01 CET 2011


Thomas,

> There might very well arise a race condition if the server is _very_
> fast, so that "magic" stuff can happen between the "if"(!(started <
> requests))" guard and the "started++;" call.
> 
> Does this sound plausible, 

Yes. Looks like a good explanation. So all this is due to the fact that
AWS is a too fast web server :)

> and if so, would it be possible to fix this
> annoyance in Apache Bench? Or is it simply the nature of the beast?

It is probably possible to fix, but for that the set_conn_state() and
started++ should be atomic, so it would be necessary to use a semaphore
around them and around the test (started<requests).

Another option is to add some delay in AWS code :)

All in all the ab is giving proper results in term of performance, only
the total of HTML transferred can be wrong. Not that bad I would say.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B



More information about the AWS mailing list