m1.largeのスペックは
メモリ:7.5 GiB
コンピューティングユニット:4
仮想コア数:2
コアの種類:各 2 ECU
ネットワークパフォーマンス:モデレート
OSは以下です。
more /etc/system-release
Amazon Linux AMI release 2013.09
ベンチマークツールはこちら wg/wrk を利用しました。
https://github.com/wg/wrk
wg/wrkをmakeするには、openssl-develとgccが必要です。
nginxのインストールはyumでやりました。
yum yum するのは、以下で終わりです。
yum install nginx git gcc openssl-devel
結果は以下です。
コマンドは、
./wrk -t スレッド数 -c 接続数 -d 処理時間 URL
です。
./wrk -t12 -c400 -d30s http://localhost/pass.html
Running 30s test @ http://localhost/pass.html
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 21.14s 11.29s 29.99s 77.85%
Req/Sec 5.28k 4.02k 9.00k 63.45%
470558 requests in 30.02s, 146.74MB read
Socket errors: connect 0, read 0, write 0, timeout 5417
Requests/sec: 15676.21
Transfer/sec: 4.89MB
タイムアウトもあるし平均20秒かかるってのもどうかと思うので。
なんとなく減らしてみました。
./wrk -t 4 -c 10 -d 10 http://localhost/index.html
Running 10s test @ http://localhost/index.html
4 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 483.22us 281.37us 7.80ms 69.14%
Req/Sec 4.50k 1.15k 7.55k 54.73%
169518 requests in 9.98s, 52.86MB read
Requests/sec: 16977.78
Transfer/sec: 5.29MB
maxが7.8ミリ秒、平均483.22マイクロ秒
169518 リクエスト大成功?タイムアウトもなし。
何これすげー速いな。
こちらのサイトを参考にさせていただきました。
「G-WANはなぜ速いのか?をnginxと比べながら検証してみた」blog.nomadscafe.jp | http://blog.nomadscafe.jp/2013/09/benchmark-g-wan-and-nginx.html
設定ファイルはコレ。です。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters