nginx: poundはやーめた。
ラフテストのラフログ。
Connection Times (ms)
min mean[+/-sd] median max
Connect: 189 196 7.3 194 213
Processing: 3163 3684 500.0 3655 4446
Waiting: 2394 2855 469.5 2703 3670
Total: 3357 3880 502.3 3868 4637 Percentage of the requests served within a certain time (ms)
50% 3868
66% 4098
75% 4390
80% 4526
90% 4637
95% 4637
98% 4637
99% 4637
100% 4637 (longest request) Connection Times (ms)
min mean[+/-sd] median max
Connect: 183 192 6.2 193 203
Processing: 5676 10306 4540.8 7768 18263
Waiting: 4866 9493 4554.8 6991 17451
Total: 5869 10497 4542.9 7954 18467 Percentage of the requests served within a certain time (ms)
50% 7954
66% 14123
75% 14345
80% 15330
90% 18467
95% 18467
98% 18467
99% 18467
100% 18467 (longest request) なので、nginxにします。 EM114-48-195-142:~ hide$ ab -n 10 -c 2 http://ec2-67-202-20-195.compute-1.amazonaws.com/ Percentage of the requests served within a certain time (ms)
50% 5214
66% 5510
75% 5519
80% 5565
90% 5577
95% 5577
98% 5577
99% 5577
100% 5577 (longest request) nginx のworker = 2にあげる Percentage of the requests served within a certain time (ms)
50% 5223
66% 5557
75% 5599
80% 5629
90% 5694
95% 5694
98% 5694
99% 5694
100% 5694 (longest request) かわんない。railsがすでにパンパン?
mongrel_clusterを3にしたら、 Percentage of the requests served within a certain time (ms)
50% 4946
66% 5144
75% 5182
80% 5466
90% 5516
95% 5516
98% 5516
99% 5516
100% 5516 (longest request)
すこしはやくなった? 多重度3にしてみた。
EM114-48-195-142:~ hide$ ab -n 10 -c 3 http://ec2-67-202-20-195.compute-1.amazonaws.com/ Percentage of the requests served within a certain time (ms)
50% 5847
66% 5911
75% 6424
80% 6484
90% 6752
95% 6752
98% 6752
99% 6752
100% 6752 (longest request) nginx のupstream を2にさげると、遅くなったよ。
Percentage of the requests served within a certain time (ms)
50% 5847
66% 5911
75% 6424
80% 6484
90% 6752
95% 6752
98% 6752
99% 6752
100% 6752 (longest request) mongrel_clusterのインスタンス数と同じぐらいのnginxのworkerにすればいいの? EM114-48-195-142:~ hide$ ab -n 50 -c 5 http://ec2-67-202-20-195.compute-1.amazonaws.com/ Percentage of the requests served within a certain time (ms)
50% 7645
66% 8128
75% 8376
80% 8558
90% 9677
95% 9728
98% 10081
99% 10081
100% 10081 (longest request) load averageが 1こえてるのでレイテンシが高くなってる。 4 で 4
EM114-48-195-142:~ hide$ ab -n 40 -c 4 http://ec2-67-202-20-195.compute-1.amazonaws.com/ Percentage of the requests served within a certain time (ms)
50% 6794
66% 7205
75% 7333
80% 7435
90% 8301
95% 8331
98% 9613
99% 9613
100% 9613 (longest request) Amazon AWS の mideum インスタンスだと、mongrel_cluster 3つか4つだな。nginxのworkerは1か2なのかね。
min mean[+/-sd] median max
Connect: 189 196 7.3 194 213
Processing: 3163 3684 500.0 3655 4446
Waiting: 2394 2855 469.5 2703 3670
Total: 3357 3880 502.3 3868 4637 Percentage of the requests served within a certain time (ms)
50% 3868
66% 4098
75% 4390
80% 4526
90% 4637
95% 4637
98% 4637
99% 4637
100% 4637 (longest request) Connection Times (ms)
min mean[+/-sd] median max
Connect: 183 192 6.2 193 203
Processing: 5676 10306 4540.8 7768 18263
Waiting: 4866 9493 4554.8 6991 17451
Total: 5869 10497 4542.9 7954 18467 Percentage of the requests served within a certain time (ms)
50% 7954
66% 14123
75% 14345
80% 15330
90% 18467
95% 18467
98% 18467
99% 18467
100% 18467 (longest request) なので、nginxにします。 EM114-48-195-142:~ hide$ ab -n 10 -c 2 http://ec2-67-202-20-195.compute-1.amazonaws.com/ Percentage of the requests served within a certain time (ms)
50% 5214
66% 5510
75% 5519
80% 5565
90% 5577
95% 5577
98% 5577
99% 5577
100% 5577 (longest request) nginx のworker = 2にあげる Percentage of the requests served within a certain time (ms)
50% 5223
66% 5557
75% 5599
80% 5629
90% 5694
95% 5694
98% 5694
99% 5694
100% 5694 (longest request) かわんない。railsがすでにパンパン?
mongrel_clusterを3にしたら、 Percentage of the requests served within a certain time (ms)
50% 4946
66% 5144
75% 5182
80% 5466
90% 5516
95% 5516
98% 5516
99% 5516
100% 5516 (longest request)
すこしはやくなった? 多重度3にしてみた。
EM114-48-195-142:~ hide$ ab -n 10 -c 3 http://ec2-67-202-20-195.compute-1.amazonaws.com/ Percentage of the requests served within a certain time (ms)
50% 5847
66% 5911
75% 6424
80% 6484
90% 6752
95% 6752
98% 6752
99% 6752
100% 6752 (longest request) nginx のupstream を2にさげると、遅くなったよ。
Percentage of the requests served within a certain time (ms)
50% 5847
66% 5911
75% 6424
80% 6484
90% 6752
95% 6752
98% 6752
99% 6752
100% 6752 (longest request) mongrel_clusterのインスタンス数と同じぐらいのnginxのworkerにすればいいの? EM114-48-195-142:~ hide$ ab -n 50 -c 5 http://ec2-67-202-20-195.compute-1.amazonaws.com/ Percentage of the requests served within a certain time (ms)
50% 7645
66% 8128
75% 8376
80% 8558
90% 9677
95% 9728
98% 10081
99% 10081
100% 10081 (longest request) load averageが 1こえてるのでレイテンシが高くなってる。 4 で 4
EM114-48-195-142:~ hide$ ab -n 40 -c 4 http://ec2-67-202-20-195.compute-1.amazonaws.com/ Percentage of the requests served within a certain time (ms)
50% 6794
66% 7205
75% 7333
80% 7435
90% 8301
95% 8331
98% 9613
99% 9613
100% 9613 (longest request) Amazon AWS の mideum インスタンスだと、mongrel_cluster 3つか4つだな。nginxのworkerは1か2なのかね。