WAFer
WAFer copied to clipboard
Load Test Failed
I carried out a load test for nope example.
./wrk -t1 -c1 -d10s http://localhost:4242/factor
The config is: NOPE_EPOLL, NOPE_THREAD 2 The bug looks like this:
GET /factorGET /factorGET /factorGET /factorGET /factorGET /factorGET /factorGET /factorGET .... /factorGET /factorGEclose: Bad file descriptor
Same config:
ab -n10000 -c10 http://localhost:4242/factor?q=22
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests
Server Software: nope.chttpd/0.1.0
Server Hostname: localhost
Server Port: 4242
Document Path: /factor?q=22
Document Length: 133 bytes
Concurrency Level: 10
Time taken for tests: 0.795 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 2270000 bytes
HTML transferred: 1330000 bytes
Requests per second: 12573.02 [#/sec] (mean)
Time per request: 0.795 [ms] (mean)
Time per request: 0.080 [ms] (mean, across all concurrent requests)
Transfer rate: 2787.18 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 1
Processing: 0 1 4.7 0 101
Waiting: 0 0 4.7 0 101
Total: 0 1 4.7 0 101
Percentage of the requests served within a certain time (ms)
50% 0
66% 0
75% 1
80% 1
90% 1
95% 1
98% 1
99% 2
100% 101 (longest request)
Single threaded is actually faster
ab -n10000 -c10 http://localhost:4242/factor?q=22
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests
Server Software: nope.chttpd/0.1.0
Server Hostname: localhost
Server Port: 4242
Document Path: /factor?q=22
Document Length: 133 bytes
Concurrency Level: 10
Time taken for tests: 0.358 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 2270000 bytes
HTML transferred: 1330000 bytes
Requests per second: 27948.03 [#/sec] (mean)
Time per request: 0.358 [ms] (mean)
Time per request: 0.036 [ms] (mean, across all concurrent requests)
Transfer rate: 6195.51 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 1
Processing: 0 0 0.1 0 2
Waiting: 0 0 0.1 0 2
Total: 0 0 0.1 0 2
Percentage of the requests served within a certain time (ms)
50% 0
66% 0
75% 0
80% 0
90% 0
95% 0
98% 0
99% 0
100% 2 (longest request)
GET /factorGET /factorGET /factorGET /factorGET is just stray output. I have taken it out.
I will do some more elaborate tests to confirm the result. In the mean time, may you try this ? https://github.com/wg/wrk
Thanks!
I did try wrk, and it reported 0 requests as being completed. I am not entirely sure as to why.