Hi, Michael !
I suppose "Connection Times (ms)" table section actually describes
individual requests? And "Percentage of the requests served within a certain
time (ms)" as well?
For me it seems that concurrency is hardly working at all, but threads are
blocked (or waiting) somewhere outside of doGet Servlet's method, cause
doGet performance doesn't not differ to that extend (although there is some
waiting issues inside obviously)
I made 3 new measurements for different concurrency levels (100, 10, 1)
----------------
Servlet's doGet overall method execution time is counted this way
static long overall
doGet(request, response)
{
long start = System.currentTimeMillis();
// here goes logic
…
//synchronized{
overall += System.currentTimeMillis() - start;
}
}
----------------
Concurrency = 100
=======================================
ab.exe - n 100 -c 100 {address}
ab.exe execution time=7.641 seconds
overall doGet servlet execution =8067
=======================================
Concurrency Level: 100
Time taken for tests: 8.234 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 2770200 bytes
HTML transferred: 2742700 bytes
Requests per second: 12.14 [#/sec] (mean)
Time per request: 8234.375 [ms] (mean)
Time per request: 82.344 [ms] (mean, across all concurrent requests)
Transfer rate: 328.53 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 16 70 33.3 63 172
Processing: 500 4097 2098.4 4141 7719
Waiting: 141 3700 2115.9 3719 7344
Total: 547 4168 2097.3 4266 7734
Percentage of the requests served within a certain time (ms)
50% 4266
66% 5344
75% 5984
80% 6344
90% 7109
95% 7500
98% 7672
99% 7734
100% 7734 (longest request)
Concurrency = 10
=======================================
ab.exe - n 100 -c 10 {address}
ab.exe execution time=8.094 seconds
overall doGet servlet execution =7206
=======================================
Concurrency Level: 10
Time taken for tests: 8.094 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 2770200 bytes
HTML transferred: 2742700 bytes
Requests per second: 12.36 [#/sec] (mean)
Time per request: 809.375 [ms] (mean)
Time per request: 80.938 [ms] (mean, across all concurrent requests)
Transfer rate: 334.24 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 31 75 29.0 78 141
Processing: 172 695 149.0 734 891
Waiting: 109 344 143.7 328 719
Total: 250 770 156.3 813 1000
Percentage of the requests served within a certain time (ms)
50% 813
66% 828
75% 844
80% 875
90% 922
95% 953
98% 1000
99% 1000
100% 1000 (longest request)
Concurrency = 1
=======================================
ab.exe - n 100 -c 1 {address}
ab.exe execution time=10.578 seconds
overall doGet servlet execution=4672
=======================================
Concurrency Level: 1
Time taken for tests: 10.578 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 2770200 bytes
HTML transferred: 2742700 bytes
Requests per second: 9.45 [#/sec] (mean)
Time per request: 105.781 [ms] (mean)
Time per request: 105.781 [ms] (mean, across all concurrent requests)
Transfer rate: 255.74 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 16 24 8.1 31 47
Processing: 63 81 8.8 78 109
Waiting: 63 67 7.6 63 94
Total: 94 105 9.0 109 125
Percentage of the requests served within a certain time (ms)
50% 109
66% 109
75% 109
80% 109
90% 109
95% 125
98% 125
99% 125
100% 125 (longest request)
============================================================================
============================================================================
Michael Ludwig-6 wrote:
>
> kazukin6 schrieb am 13.12.2008 um 18:15:33 (-0800):
>> 1) there is maxThreads=100 in context.xml
>> 2) sending 100 simultaneous requests to one servlet, for example ab.exe
>> -n
>> 100 -c 100 {address}
>> 3) in the servlet's own log for performance it shows around only 200-500
>> ms
>> per request
>> 4) in the ab.exe log it shows around 7 seconds(!) per request
>
> It doesn't, at least not in the log you're showing here.
>
>> full log of ab.exe is
>> ====================================================
>> Concurrency Level: 100
>> Time taken for tests: 16.656 seconds
>
> That's the time taken altogether.
>
>> Complete requests: 100
>> Failed requests: 0
>> Write errors: 0
>
> Everything fine.
>
>> Total transferred: 2770200 bytes
>> HTML transferred: 2742700 bytes
>> Requests per second: 6.00 [#/sec] (mean)
>> Time per request: 16656.250 [ms] (mean)
>
> This is the total time divided by, well, "request": You have only one
> request in this sense, because you send all of your total 100 requests
> in parallel. To verify, try:
>
> ab -n 100 -c 10 http://localhost/
>
> That should get you about a tenth of the time taken altogether.
>
>> Time per request: 166.563 [ms] (mean, across all concurrent
>> requests)
>> Transfer rate: 162.42 [Kbytes/sec] received
>
> Michael Ludwig
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/tomcat6%2C-bottleneck%2C-concurrent-requests%2C-windows-xp-tp20996642p21007968.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]