さくらのVPS 1Gと2Gを比較してみた
測定するタイミングだとか、そもそも申し込んだタイミング(つまり、割り当てられたマシン?)によって、かなりの揺らぎがあるような感覚がありますので、これだけの結果で一般解が導ける訳ではないのですが、まあ一つの参考値にはなるのではないでしょうか。あと、これらの数値の見方が正しいのかどうかも、はっきりいって確信がありません。
と、前置きが長くなってしまいましたが、スペック表からみるとコストパフォーマンスが最も高そうな2Gプランですが、200Gの容量が必要でないなら、1Gでも良いのでは?という気がします。勿論、CPUのコア数やメモリの量がもろに効いてくるようなプログラムなら別ですが、シングルコアでディスクの読み書きを延々と繰り返すようなバッチ処理が多いシステムの場合、ほとんど性能に差がつきません。それよりも同じ予算があれば1.5倍の台数を確保できる1Gの方が魅力的かなぁ…というのが結論です。
VPS 1G
# mysqlslap --no-defaults --concurrency=10 --iterations=1 --engine=innodb --number-of-queries=10000 --auto-generate-sql
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 14.509 seconds
Minimum number of seconds to run all queries: 14.509 seconds
Maximum number of seconds to run all queries: 14.509 seconds
Number of clients running queries: 10
Average number of queries per client: 1000
# sysbench --test=cpu run
Maximum prime number checked in CPU test: 10000
Test execution summary:
total time: 12.2500s
total number of events: 10000
total time taken by event execution: 12.2461
per-request statistics:
min: 1.19ms
avg: 1.22ms
max: 4.11ms
approx. 95 percentile: 1.32ms
Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 12.2461/0.00
# sysbench --test=fileio --file-test-mode=rndrw prepare
# sysbench --test=fileio --file-test-mode=rndrw run
Operations performed: 6000 Read, 4000 Write, 12800 Other = 22800 Total
Read 93.75Mb Written 62.5Mb Total transferred 156.25Mb (3.9792Mb/sec)
254.67 Requests/sec executed
Test execution summary:
total time: 39.2666s
total number of events: 10000
total time taken by event execution: 34.4308
per-request statistics:
min: 0.01ms
avg: 3.44ms
max: 135.25ms
approx. 95 percentile: 10.45ms
Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 34.4308/0.00
# ab ***
Server Software: Apache/2.2.15
Server Hostname: ***
Server Port: 80
Document Path: /
Document Length: 7066 bytes
Concurrency Level: 1
Time taken for tests: 2.125 seconds
Complete requests: 1
Failed requests: 0
Write errors: 0
Total transferred: 7367 bytes
HTML transferred: 7066 bytes
Requests per second: 0.47 [#/sec] (mean)
Time per request: 2125.290 [ms] (mean)
Time per request: 2125.290 [ms] (mean, across all concurrent requests)
Transfer rate: 3.39 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 8 8 0.0 8 8
Processing: 2117 2117 0.0 2117 2117
Waiting: 2116 2116 0.0 2116 2116
Total: 2125 2125 0.0 2125 2125
VPS 2G
# mysqlslap --no-defaults --concurrency=10 --iterations=1 --engine=innodb --number-of-queries=10000 --auto-generate-sql
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 14.994 seconds
Minimum number of seconds to run all queries: 14.994 seconds
Maximum number of seconds to run all queries: 14.994 seconds
Number of clients running queries: 10
Average number of queries per client: 1000
# sysbench --test=cpu run
Test execution summary:
total time: 13.5609s
total number of events: 10000
total time taken by event execution: 13.5560
per-request statistics:
min: 1.15ms
avg: 1.36ms
max: 4.59ms
approx. 95 percentile: 1.83ms
Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 13.5560/0.00
# sysbench --test=fileio --file-test-mode=rndrw prepare
# sysbench --test=fileio --file-test-mode=rndrw run
Operations performed: 6000 Read, 4000 Write, 12800 Other = 22800 Total
Read 93.75Mb Written 62.5Mb Total transferred 156.25Mb (4.0329Mb/sec)
258.10 Requests/sec executed
Test execution summary:
total time: 38.7441s
total number of events: 10000
total time taken by event execution: 25.5189
per-request statistics:
min: 0.01ms
avg: 2.55ms
max: 116.35ms
approx. 95 percentile: 15.82ms
Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 25.5189/0.00
# ab ***
Server Software: Apache/2.2.15
Server Hostname: ***
Server Port: 80
Document Path: /
Document Length: 7737 bytes
Concurrency Level: 1
Time taken for tests: 2.206 seconds
Complete requests: 1
Failed requests: 0
Write errors: 0
Total transferred: 7984 bytes
HTML transferred: 7737 bytes
Requests per second: 0.45 [#/sec] (mean)
Time per request: 2206.196 [ms] (mean)
Time per request: 2206.196 [ms] (mean, across all concurrent requests)
Transfer rate: 3.53 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 8 8 0.0 8 8
Processing: 2198 2198 0.0 2198 2198
Waiting: 2198 2198 0.0 2198 2198
Total: 2206 2206 0.0 2206 2206
参考URL
この記事は役に立ちましたか?
- EnglishWorm.com
- SinglesFan.com
- LmLab.net
- サイトマップ
- 運営者について