yuitaso / sunrise

1 stars 0 forks source link

[負荷テスト]通常リクエスト x4 #14

Open pei0804 opened 7 years ago

pei0804 commented 7 years ago

https://github.com/YuiOmata/sunrise/issues/13#issuecomment-264619598

pei0804 commented 7 years ago

求められる値

通常時

44px/s
700/s

イベント

222pv/s
3552/s
pei0804 commented 7 years ago

テスト結果 2台からシーグ

2000 アクセス x4 リクエスト

2台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/ad_1.html
http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html
http://133.242.51.115/revive/www/images/046fec30699207a354b8bb103f9d8ace.png
http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

Transactions:               78293 hits
Availability:               99.88 %
Elapsed time:               76.41 secs
Data transferred:           62.98 MB
Response time:                0.63 secs
Transaction rate:         1024.64 trans/sec
Throughput:                0.82 MB/sec
Concurrency:              649.64
Successful transactions:       78721
Failed transactions:              95
Longest transaction:           56.76
Shortest transaction:            0.00
CPU: 100%
memory: 450MB
pei0804 commented 7 years ago

テスト結果 1台からシーグ

1000 アクセス x4 リクエスト

1台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/ad_1.html
http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html
http://133.242.51.115/revive/www/images/046fec30699207a354b8bb103f9d8ace.png
http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

Transactions:               47269 hits
Availability:              100.00 %
Elapsed time:               29.62 secs
Data transferred:          104.72 MB
Response time:                0.21 secs
Transaction rate:         1595.85 trans/sec
Throughput:                3.54 MB/sec
Concurrency:              336.14
Successful transactions:       47526
Failed transactions:               0
Longest transaction:            7.02
Shortest transaction:            0.00
CPU: 80%
memory: 380MB
pei0804 commented 7 years ago

テスト結果 2台からシーグ

2000 アクセス x 1 リクエスト

2台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html

結果

pei0804 commented 7 years ago

テスト結果 1台からシーグ

1000 アクセス x 1 リクエスト

1台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html

結果

pei0804 commented 7 years ago

テスト結果 2台からシーグ

2000 アクセス x 1 リクエスト

2台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

pei0804 commented 7 years ago

テスト結果 1台からシーグ

1000 アクセス x 1 リクエスト

1台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

pei0804 commented 7 years ago

テスト結果 (AP x 1 DB x 1 スケールアウト)2台からシーグ

APとDBを分ける

2000 アクセス x4 リクエスト

2台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/ad_1.html
http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html
http://133.242.51.115/revive/www/images/046fec30699207a354b8bb103f9d8ace.png
http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

Transactions:               20172 hits
Availability:              100.00 %
Elapsed time:               22.25 secs
Data transferred:           47.37 MB
Response time:                0.65 secs
Transaction rate:          906.61 trans/sec
Throughput:                2.13 MB/sec
Concurrency:              588.05
Successful transactions:       20703
Failed transactions:               0
Longest transaction:            4.57
pei0804 commented 7 years ago

テスト結果 (AP x 1 DB x 1 スケールアウト)1台からシーグ

APとDBを分ける

1000 アクセス x4 リクエスト

1台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/ad_1.html
http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html
http://133.242.51.115/revive/www/images/046fec30699207a354b8bb103f9d8ace.png
http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

Transactions:              132893 hits
Availability:              100.00 %
Elapsed time:               85.98 secs
Data transferred:          295.90 MB
Response time:                0.03 secs
Transaction rate:         1545.63 trans/sec
Throughput:                3.44 MB/sec
Concurrency:               39.10
Successful transactions:      133587
Failed transactions:               0
Longest transaction:            2.17
Shortest transaction:            0.00
pei0804 commented 7 years ago

テスト結果 (AP x 2 DB x 1 スケールアウト)2台からシーグ

APとDBを分ける

2000 アクセス x4 リクエスト

2台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/ad_1.html
http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html
http://133.242.51.115/revive/www/images/046fec30699207a354b8bb103f9d8ace.png
http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

Transactions:               62815 hits
Availability:              100.00 %
Elapsed time:               43.87 secs
Data transferred:          136.92 MB
Response time:                0.04 secs
Transaction rate:         1431.84 trans/sec
Throughput:                3.12 MB/sec
Concurrency:               58.79
Successful transactions:       63475
Failed transactions:               0
Longest transaction:            2.31
Shortest transaction:            0.00
pei0804 commented 7 years ago

DATABASEにのみ負荷かける

リクエスト数

3552pv 222px x 4枠 x 4req

DBへのアクセス

lg.php

900

asyncspc.php

900

pei0804 commented 7 years ago

テスト結果 (AP x 2 DB x 1 スケールアウト)2台からシーグ

APとDBを分ける

2000 アクセス x1 リクエスト

2台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

Transactions:               36526 hits
Availability:              100.00 %
Elapsed time:               38.29 secs
Data transferred:            1.50 MB
Response time:                0.74 secs
Transaction rate:          953.93 trans/sec
Throughput:                0.04 MB/sec
Concurrency:              703.61
Successful transactions:       36526
Failed transactions:               0
Longest transaction:           33.10
Shortest transaction:            0.02
pei0804 commented 7 years ago

テスト結果 (AP x 2 DB x 1 スケールアウト)2台からシーグ

APとDBを分ける

2000 アクセス x1 リクエスト

2台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html

結果

Transactions:               12440 hits
Availability:              100.00 %
Elapsed time:                9.63 secs
Data transferred:            9.71 MB
Response time:                0.16 secs
Transaction rate:         1291.80 trans/sec
Throughput:                1.01 MB/sec
Concurrency:              208.17
Successful transactions:       12916
Failed transactions:               0
Longest transaction:            3.34
Shortest transaction:            0.00
pei0804 commented 7 years ago

テスト結果 (AP x 3 DB x 1 スケールアウト)3台からシーグ

APとDBを分ける

3000 アクセス x2 リクエスト

2台から以下のコマンド、リクエストを実行

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html
http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

Transactions:              32176 hits
Availability:             100.00 %
Elapsed time:              38.06 secs
Data transferred:          12.80 MB
Response time:              0.05 secs
Transaction rate:         845.40 trans/sec
Throughput:             0.34 MB/sec
Concurrency:               41.48
Successful transactions:       32176
Failed transactions:               0
Longest transaction:            3.09
Shortest transaction:           0.00
pei0804 commented 7 years ago

結論:Nginxは2台までスケールアウトすれば余裕だ。MySQLは1台でよろしい。

pei0804 commented 7 years ago

テスト結果 APサーバーテスト

siege -c 1000 -f siege.txt

siege.txt

http://133.242.51.115/ad_1.html
http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html
http://133.242.51.115/revive/www/images/046fec30699207a354b8bb103f9d8ace.png
http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

Transactions:              303768 hits
Availability:              100.00 %
Elapsed time:              231.40 secs
Data transferred:          672.92 MB
Response time:                0.27 secs
Transaction rate:         1312.74 trans/sec
Throughput:                2.91 MB/sec
Concurrency:              351.73
Successful transactions:      304702
Failed transactions:               0
Longest transaction:           15.05
Shortest transaction:            0.00
CPU:60~80%
pei0804 commented 7 years ago

テスト結果 APサーバーテスト

siege -c 900 -f siege.txt

siege.txt

http://133.242.51.115/ad_1.html
http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html
http://133.242.51.115/revive/www/images/046fec30699207a354b8bb103f9d8ace.png
http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

Transactions:              203793 hits
Availability:              100.00 %
Elapsed time:              152.22 secs
Data transferred:          451.78 MB
Response time:                0.24 secs
Transaction rate:         1338.81 trans/sec
Throughput:                2.97 MB/sec
Concurrency:              324.95
Successful transactions:      204352
Failed transactions:               0
Longest transaction:            7.27
Shortest transaction:            0.00
CPU: 60% ~ 70%
pei0804 commented 7 years ago

テスト結果 APサーバーテスト

siege -c 800 -f siege.txt

siege.txt

http://133.242.51.115/ad_1.html
http://133.242.51.115/revive/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html
http://133.242.51.115/revive/www/images/046fec30699207a354b8bb103f9d8ace.png
http://133.242.51.115/revive/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=1&loc=http%3A%2F%2F133.242.51.115%2Fad_1.html&referer=http%3A%2F%2F133.242.51.115%2Fad_1.html&cb=4f53bdabd1

結果

CPU: 60% ~ 70%
pei0804 commented 7 years ago

APサーバーは1000捌けます。 APサーバーは4台居るよね。

pei0804 commented 7 years ago

サーバの処理能力(1枠4requests計算)

1台のAPサーバ 1000requests:1595.85 trans/sec 2000requests:1024.64 trans/sec