[AWS] Further info on the weird "AWS is returning too much data" issue

Thomas Løcke thomas.granvej6 at gmail.com
Tue Jan 25 09:15:14 CET 2011


On Mon, Jan 24, 2011 at 9:40 PM, Pascal Obry <pascal at obry.net> wrote:
> This looks very very bad and does not correspond to any experience I
> have with AWS. I'm really concerned by this results. What's your AWS
> server looks like?


It's your own demos/hello_world example, where there only thing I've
changed is the Response.Build call in hello_world_cb.adb:

    return AWS.Response.Build
        ("text/html", "<html><body><h1>Hello World</h1></body></html>");

And then I've added this to hello_world.adb:

    AWS.Server.Wait (AWS.Server.Q_Key_Pressed);

Also, obviously, I'm starting the server log occasionally if I want to
verify that AWS has generated too much content:

    AWS.Server.Log.Start (Web_Server => WS);

When I raise Max_Connection > 1, and start hitting it with more than
one client, it starts to return the wrong amount of bytes.
Occasionally.

I did a run where Max_Connection was at 5, and ab was running 4
simultaneous clients (ab -n 50000 -c 4 URL). The end result should
have been:

    Complete requests:      50000
    Total transferred:      10200000 bytes
    HTML transferred:      2300000 bytes

But instead I got:

    Complete requests:      50000
    Total transferred:      10200612 bytes
    HTML transferred:      2300138 bytes

And if I count the lines ending with "200 46" (46 because the content
is 46 bytes long) in the AWS access log, I get 50003, which is
obviously wrong. ApacheBench reports, as you can see, 50000 completed
requests. Why AWS feel the need to deliver those extra 3 is beyond me.

I've tested this on both 32 and 64 bit systems using GNATMAKE GPL 2010
(20100603). AWS is version 2.10.0 (latest SVN checkout).

On a final, and very anecdotal, note I'd like to add that the problem
seems to "goes away" when I'm testing it in a slow virtual machine
(VirtualBox 3.2.12). Or rather I've not been able to reproduce it. So
perhaps we're dealing with some rare race condition that only occurs
on very fast multicore CPU's? I'm doing these tests using a Sun Ultra
27 workstation with 6GB RAM. It's not exactly the slowest of
computers.

Let me know if there are any other tests you'd like me to do.

:o)
Thomas Løcke


More information about the AWS mailing list