Skip to content

Instantly share code, notes, and snippets.

@taisyo7333
Last active October 28, 2016 01:51
Show Gist options
  • Save taisyo7333/d05490a4460086644ccc0c9fa8e990a9 to your computer and use it in GitHub Desktop.
Save taisyo7333/d05490a4460086644ccc0c9fa8e990a9 to your computer and use it in GitHub Desktop.
Mac httperf

http://macappstore.org/httperf/

mac httperf は homebrewでインストールできる

ただし、あまり接続数などに大きい数値を割り当てられない。 エラーになる

ulimit -n の上限も10000くらいが上限っぽい。 これの数値がFD_SETSIZEのようだ。

$ ulimit -n                                                                                                                  8192

成功時のログ


$ httperf --server 192.168.1.19 --port 80 --uri / --rate 3 --num-conn 3 --num-call 1 --timeout 5                            

httperf --timeout=5 --client=0/1 --server=192.168.1.19 --port=80 --uri=/ --rate=3 --send-buffer=4096 --recv-buffer=16384 --num-conns=3 --num-calls=1
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
Maximum connect burst length: 1

Total: connections 3 requests 3 replies 3 test-duration 0.720 s

Connection rate: 4.2 conn/s (240.1 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 53.1 avg 91.7 max 168.2 median 53.5 stddev 66.2
Connection time [ms]: connect 25.0
Connection length [replies/conn]: 1.000

Request rate: 4.2 req/s (240.1 ms/req)
Request size [B]: 65.0

Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (0 samples)
Reply time [ms]: response 66.2 transfer 0.5
Reply size [B]: header 450.0 content 14935.0 footer 2.0 (total 15387.0)
Reply status: 1xx=0 2xx=3 3xx=0 4xx=0 5xx=0

CPU time [s]: user 0.13 system 0.46 (user 18.4% system 64.1% total 82.5%)
Net I/O: 62.8 KB/s (0.5*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0

エラー時のログ

$ httperf --server 192.168.1.19 --port 80 --uri / --rate 300 --num-conn 300 --num-call 5 --timeout 5                         

httperf --timeout=5 --client=0/1 --server=192.168.1.19 --port=80 --uri=/ --rate=300 --send-buffer=4096 --recv-buffer=16384 --num-conns=300 --num-calls=5
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
[1]    64169 segmentation fault  httperf --server 192.168.1.19 --port 80 --uri / --rate 300 --num-conn 300  5 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment