ドル高圧力に耐えかねて、プライベート用のサーバを AWS EC2 から ConoHa VPS に移行したのが二ヶ月ほど前のこと。それが先日、コンパネをいじっていたらメニューの一番下に「バージョン切替」というボタンが出来ていて、「ナニコレ?」とポチってみたら「新バージョン(Ver.3.0)と旧バージョン(Ver.2.0)の管理画面を切り替えることができます」とのダイアログ。
実際に切り替えしてみたらサーバリストに契約中のものが表示されなくなったので、先だって立てたサーバは Ver.2 だったようです。調べてみたら 12/22 までのリニューアルキャンペーンが行われているので、ここ暫くの間にサービスがメジャーアップデートされたってこと? アナウンスメールも来てないし、聞いてないぞそれ。
結局 V2 と V3 の違いはよく分かりませんでしたが、サービスの基本形は従来とさほど変わらないようなので、実際にサーバを立てて両者の基本性能を比較してみることにしました。私が立てたサーバのタイプは「メモリ 1GB/CPU 2Core」(Ubuntu 20.4 LTS)なので、これと同様のものを。V3 でサーバ追加しようとしたら Ubuntu に 22.04 LTS が追加されてますね。今どき 20 系はちょっと古いんでね? と思ってたのでこれは嬉しい。折角なのでこちらを選択してポチッとして、さてリモートログイン。
まず lscpu で両者のプロセッサを確認。
v2:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 46 bits physical, 48 bits virtual
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 2
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz
Stepping: 7
CPU MHz: 2095.078
BogoMIPS: 4190.15
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 64 KiB
L1i cache: 64 KiB
L2 cache: 8 MiB
L3 cache: 32 MiB
NUMA node0 CPU(s): 0,1
(後略)
v3:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 40 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Vendor ID: GenuineIntel
Model name: Intel Xeon Processor (Icelake)
CPU family: 6
Model: 134
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 2
Stepping: 0
BogoMIPS: 4000.00
(中略)
Virtualization features:
Virtualization: VT-x
Hypervisor vendor: KVM
Virtualization type: full
Caches (sum of all):
L1d: 64 KiB (2 instances)
L1i: 64 KiB (2 instances)
L2: 8 MiB (2 instances)
L3: 32 MiB (2 instances)
(後略)
なるほど、プロセッサは Xeon Gold 6230 から Icelake に変わったと。最近のプロセッサ事情には疎いので、性能的にどう違うのかはよく分かりません。なので、sysbench でベンチマーキング。
v2:~$ sysbench cpu run
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Prime numbers limit: 10000
Initializing worker threads...
Threads started!
CPU speed:
events per second: 681.13
General statistics:
total time: 10.0012s
total number of events: 6814
Latency (ms):
min: 1.32
avg: 1.47
max: 7.86
95th percentile: 1.58
sum: 9991.04
Threads fairness:
events (avg/stddev): 6814.0000/0.00
execution time (avg/stddev): 9.9910/0.00
v3:~$ sysbench cpu run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Prime numbers limit: 10000
Initializing worker threads...
Threads started!
CPU speed:
events per second: 2500.00
General statistics:
total time: 10.0010s
total number of events: 25007
Latency (ms):
min: 0.40
avg: 0.40
max: 1.73
95th percentile: 0.41
sum: 9995.00
Threads fairness:
events (avg/stddev): 25007.0000/0.00
execution time (avg/stddev): 9.9950/0.00
すごいです。「CPU speed」は約3.7倍の数値。ではメモリ操作は?
v2:~$ sysbench memory run
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Running memory speed test with the following options:
block size: 1KiB
total size: 102400MiB
operation: write
scope: global
Initializing worker threads...
Threads started!
Total operations: 32082406 (3207346.87 per second)
31330.47 MiB transferred (3132.17 MiB/sec)
General statistics:
total time: 10.0002s
total number of events: 32082406
Latency (ms):
min: 0.00
avg: 0.00
max: 6.21
95th percentile: 0.00
sum: 4801.21
Threads fairness:
events (avg/stddev): 32082406.0000/0.00
execution time (avg/stddev): 4.8012/0.00
v3:~$ sysbench memory run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Running memory speed test with the following options:
block size: 1KiB
total size: 102400MiB
operation: write
scope: global
Initializing worker threads...
Threads started!
Total operations: 51360071 (5135146.49 per second)
50156.32 MiB transferred (5014.79 MiB/sec)
General statistics:
total time: 10.0001s
total number of events: 51360071
Latency (ms):
min: 0.00
avg: 0.00
max: 0.84
95th percentile: 0.00
sum: 3884.90
Threads fairness:
events (avg/stddev): 51360071.0000/0.00
execution time (avg/stddev): 3.8849/0.00
プロセッサの能力向上のせいでしょうか。転送速度が1.6倍に向上してます。次にファイル入出力を。
v2:~$ sysbench fileio --file-test-mode=seqwr run
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Initializing worker threads...
Threads started!
File operations:
reads/s: 0.00
writes/s: 8030.15
fsyncs/s: 10278.69
Throughput:
read, MiB/s: 0.00
written, MiB/s: 125.47
General statistics:
total time: 10.0098s
total number of events: 183185
Latency (ms):
min: 0.01
avg: 0.05
max: 11.42
95th percentile: 0.08
sum: 9887.20
Threads fairness:
events (avg/stddev): 183185.0000/0.00
execution time (avg/stddev): 9.8872/0.00
v3:~$ sysbench fileio --file-test-mode=seqwr run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Initializing worker threads...
Threads started!
File operations:
reads/s: 0.00
writes/s: 10705.59
fsyncs/s: 13712.75
Throughput:
read, MiB/s: 0.00
written, MiB/s: 167.27
General statistics:
total time: 10.0051s
total number of events: 244213
Latency (ms):
min: 0.01
avg: 0.04
max: 35.71
95th percentile: 0.03
sum: 9918.30
Threads fairness:
events (avg/stddev): 244213.0000/0.00
execution time (avg/stddev): 9.9183/0.00
総合的に1.3倍程向上してるようです。最後に MySQL での入出力を。事前の準備(CREATE DATABASE や GRANT 等)については省略します。
v2:~$ sysbench --db-driver=mysql --mysql-user=sysbench --mysql-password=******** --mysql-host=localhost --mysql-db=sysbench oltp_read_write run
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Initializing worker threads...
Threads started!
SQL statistics:
queries performed:
read: 35378
write: 10108
other: 5054
total: 50540
transactions: 2527 (252.57 per sec.)
queries: 50540 (5051.32 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)
General statistics:
total time: 10.0026s
total number of events: 2527
Latency (ms):
min: 2.44
avg: 3.95
max: 24.78
95th percentile: 5.28
sum: 9992.98
Threads fairness:
events (avg/stddev): 2527.0000/0.00
execution time (avg/stddev): 9.9930/0.00
v3:~$ sysbench --db-driver=mysql --mysql-user=sysbench --mysql-password=******** --mysql-host=localhost --mysql-db=sysbench oltp_read_write run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Initializing worker threads...
Threads started!
SQL statistics:
queries performed:
read: 91098
write: 26028
other: 13014
total: 130140
transactions: 6507 (650.48 per sec.)
queries: 130140 (13009.58 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)
General statistics:
total time: 10.0016s
total number of events: 6507
Latency (ms):
min: 1.20
avg: 1.54
max: 10.59
95th percentile: 2.00
sum: 9989.15
Threads fairness:
events (avg/stddev): 6507.0000/0.00
execution time (avg/stddev): 9.9891/0.00
こちらも2.6倍の向上というご機嫌な結果に。
まぁ単純なベンチマーキングなので、アプリケーションの体感等にどの程度現れてくるかは分かりませんが、これなら V2 ユーザは V3 に移行して損はないようです。ConoHa さんももうちょっと積極的にプッシュしたらエエのでは。