38. JVM パフォーマンス・トライアングル
C × T × R = k (定数)
k に対して C, T, R のどこに
比重を置くか変えるのがチューニング
k を増加させるのが最適化 (Optimization)
(Twitter社ソフトウェアエンジニアの発表)
http://www.beyondlinux.com/files/pub/qconhangzhou2011/Everything%20I%20ever%20learned
%20about%20JVM%20performance%20tuning%20@twitter%28Attila%20Szegedi%29.pdf
68. ab - Apache Bench
Apache 付属
シンプルなベンチマークツール
http://httpd.apache.org/docs/2.2/programs/ab.html
単純な要件であればこれで十分
最新バージョンの利用を推奨
(Amazon Linux プリインストールのバージョンでバグに苦しめられた)
コマンド実行例
ab -C <Cookie名=値> -n <リクエスト件数> -c <同時実行数> “<URL>“
69. ab - Apache Bench
実行結果の例 (一部)
Benchmarking example.com (be patient)
Completed 1200 requests
Completed 2400 requests
(略)
Completed 10800 requests
Completed 12000 requests
Finished 12000 requests
(略)
Concurrency Level: 200
Time taken for tests: 7.365 seconds
Complete requests: 12000
Failed requests: 0
Write errors: 0
Total transferred: 166583579 bytes
HTML transferred: 160331058 bytes
Requests per second: 1629.31 [#/sec] (mean)
Time per request: 122.751 [ms] (mean)
Time per request: 0.614 [ms] (mean, across all concurrent requests)
Transfer rate: 22087.90 [Kbytes/sec] received
(略)
Percentage of the requests served within a certain time (ms)
50% 116
66% 138
75% 146
80% 150
90% 161
95% 170
98% 185
99% 208
100% 308 (longest request)
Requests per second
= QPS