All,
I've started load testing my application using ApacheBench and I think I must be missing something. I only heard about this tool very recently, so I have pretty much no experience with it.

I was getting some odd behavior (i.e. very long response times compared to what I observe when just hitting the app myself via a browser) so I decided to lower the number of requests. The response times became very erratic. I tried 10 requests. Sometimes, I'd get all of them back within a few (<10) ms. Other times, it would take 5-10 seconds for the last few requests. I figured I'd profile it.

So I did. But I continued to get strange results. For example, making a single request would take 30 seconds and create a ton of objects, etc. During the "30-second test", I could use my browser and make the same request with a reasonable response time (<5 sec). Bizarre.

So, I started studying the output of ab: (Sorry for the full output, but I need some advice and I figured that more info would be better).

===========================================

localhost[root]:/usr/local/src/httpd-2.0.48/support$ ./ab -n 1 "http://host/app/simple_search.do?query=test&resourceType=-1&search=Search";
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.4 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking host (be patient).....done


Server Software: Apache/2.0.46 Server Hostname: host Server Port: 8180

Document Path: /app/simple_search.do?query=test&resourceType=-1&search=Search
Document Length: 14140 bytes

Concurrency Level: 1
Time taken for tests: 108.739776 seconds
Complete requests: 1
Failed requests: 215
(Connect: 0, Length: 0, Exceptions: 215)
Write errors: 0
Total transferred: 3069721 bytes
HTML transferred: 3017449 bytes
Requests per second: 0.01 [#/sec] (mean)
Time per request: 108739.777 [ms] (mean)
Time per request: 108739.777 [ms] (mean, across all concurrent requests)
Transfer rate: 27.56 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:  1422 1422   0.0   1422    1422
Waiting:     1059 1059   0.0   1059    1059
Total:       1422 1422   0.0   1422    1422
localhost[root]:/usr/local/src/httpd-2.0.48/support$

===========================================

WTF? 215 failed requests? I only asked for one! Not only that, but I tailed my apache request log during a subsequent identical test and found lots of these:

192.168.1.43 - - [03/Apr/2004:13:29:49 -0500] "GET /app/simple_search.do?query=test&resourceType=-1&search=Search HTTP/1.0" 200 14146
192.168.1.43 - - [03/Apr/2004:13:29:49 -0500] "GET /app/simple_search.do?query=test&resourceType=-1&search=Search HTTP/1.0" 200 14140
192.168.1.43 - - [03/Apr/2004:13:29:50 -0500] "GET /app/simple_search.do?query=test&resourceType=-1&search=Search HTTP/1.0" 200 14140
192.168.1.43 - - [03/Apr/2004:13:29:50 -0500] "GET /app/simple_search.do?query=test&resourceType=-1&search=Search HTTP/1.0" 200 14140

WTF? Response=200 looks good to me! Why am I getting all of these "failed" requests? Am I totally missing something?

This tool seems stupidly simple to use. Am I not reading the output correctly?

I tried to use the -v switch for verbose troubleshooting information, but I don't know what the following argument should be. I tried everything I could think of like numbers and stuff like "debug" "error", etc. -- no dice.

Please, can someone help me understand what I'm doing wrong?

Thanks a /ton/ in advance,
-chris

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to