about wrk
[ install wrk ]
install wrk on ubuntu 13.04 64bit.
# git clone https://github.com/wg/wrk.git
# cd wrk/
# make
# ls
LICENSE Makefile NOTICE README deps obj scripts src wrk
# ./wrk -v
wrk 3.0.1 [epoll] Copyright (C) 2012 Will Glozer
Usage: wrk <options> <url>
Options:
-c, --connections <N> Connections to keep open
-d, --duration <T> Duration of test
-t, --threads <N> Number of threads to use
-s, --script <S> Load Lua script file
-H, --header <H> Add header to request
--latency Print latency statistics
--timeout <T> Socket/request timeout
-v, --version Print version details
Numeric arguments may include a SI unit (1k, 1M, 1G)
Time arguments may include a time unit (2s, 2m, 2h)
|
run wrk
# of connections keeping open: 10
test duration: 30 seconds
# of thread: 4
# ./wrk -d30s -c10 -t4 http://192.168.0.80
Running 30s test @ http://192.168.0.80
4 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev <- per thread
Latency 1.23ms 1.80ms 58.15ms 96.47%
Req/Sec 1.86k 443.89 5.00k 75.81%
211740 requests in 30.00s, 52.55MB read
Requests/sec: 7058.05 <- 4 threads
Transfer/sec: 1.75MB <- 4 threads
|
you can send HTTPS traffic as well.
# ./wrk --latency --timeout 1 -d30s -c10 -t4 https://192.168.0.80
Running 30s test @ https://192.168.0.80
4 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.17ms 1.42ms 32.74ms 95.72%
Req/Sec 1.91k 420.08 4.44k 79.26%
Latency Distribution
50% 1.05ms
75% 1.34ms
90% 1.85ms
99% 5.50ms
217359 requests in 30.00s, 53.94MB read
Requests/sec: 7245.44
Transfer/sec: 1.80MB
|
seems to use HTTP keep alive
# tshark -r a.pcap -R '(tcp.port==54834)' | head -20
8 0.000839000 192.168.0.1 -> 192.168.0.80 TCP 74 54834 > http [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=200331780 TSecr=0 WS=128
10 0.000918000 192.168.0.80 -> 192.168.0.1 TCP 74 http > 54834 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=43878150 TSecr=200331780 WS=16
11 0.000942000 192.168.0.1 -> 192.168.0.80 TCP 66 54834 > http [ACK] Seq=1 Ack=1 Win=14720 Len=0 TSval=200331780 TSecr=43878150
13 0.000968000 192.168.0.1 -> 192.168.0.80 HTTP 106 GET / HTTP/1.1
18 0.001105000 192.168.0.80 -> 192.168.0.1 TCP 66 http > 54834 [ACK] Seq=1 Ack=41 Win=14480 Len=0 TSval=43878150 TSecr=200331780
96 0.003553000 192.168.0.80 -> 192.168.0.1 HTTP 326 HTTP/1.1 200 OK (text/html)
97 0.003568000 192.168.0.1 -> 192.168.0.80 TCP 66 54834 > http [ACK] Seq=41 Ack=261 Win=15744 Len=0 TSval=200331780 TSecr=43878151
98 0.003623000 192.168.0.1 -> 192.168.0.80 HTTP 106 GET / HTTP/1.1
185 0.008143000 192.168.0.80 -> 192.168.0.1 HTTP 326 HTTP/1.1 200 OK (text/html)
186 0.008204000 192.168.0.1 -> 192.168.0.80 HTTP 106 GET / HTTP/1.1
213 0.009744000 192.168.0.80 -> 192.168.0.1 HTTP 326 HTTP/1.1 200 OK (text/html)
214 0.009795000 192.168.0.1 -> 192.168.0.80 HTTP 106 GET / HTTP/1.1
244 0.011393000 192.168.0.80 -> 192.168.0.1 HTTP 326 HTTP/1.1 200 OK (text/html)
245 0.011440000 192.168.0.1 -> 192.168.0.80 HTTP 106 GET / HTTP/1.1
277 0.013251000 192.168.0.80 -> 192.168.0.1 HTTP 326 HTTP/1.1 200 OK (text/html)
|
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.