物理机环境
机型 | 戴尔R720 |
---|---|
系统环境 | PVE |
CPU | E5-2660V2 2.2GHz 双路 |
内存 | 1333MHz 单通道 |
内存 | 1333MHz 双通道 |
硬盘 | 用6块转速1万的2.5寸盘组的RAID5,使用了H310mini阵列卡 |
测试工具:Sysbench。一个跨平台的基准测试工具,用于评估系统性能,包括CPU、内存、文件系统和数据库性能等。apt install sysbench
安装该工具。
虚拟机1配置
对照组1
机型 | 组装 家用机 |
---|---|
系统环境 | WSL2 ubuntu |
CPU | AMD 3600 3.33GHz |
内存 | 3200MHz 双通道 |
硬盘 | PCIE3.0 满速固态 |
CPU
虚拟机1
soulio@vm-ubt1:~$ sysbench cpu --cpu-max-prime=20000 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 timePrime numbers limit: 20000Initializing worker threads...Threads started!CPU speed:events per second: 354.62General statistics:total time: 10.0004stotal number of events: 3547Latency (ms):min: 2.69avg: 2.82max: 6.9495th percentile: 2.81sum: 9997.72Threads fairness:events (avg/stddev): 3547.0000/0.00execution time (avg/stddev): 9.9977/0.00
对照组1
是虚拟机1性能的 2x~ ❯ sysbench cpu --cpu-max-prime=20000 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 timePrime numbers limit: 20000Initializing worker threads...Threads started!CPU speed:events per second: 772.42General statistics:total time: 10.0002stotal number of events: 7725Latency (ms):min: 1.26avg: 1.29max: 3.9095th percentile: 1.32sum: 9996.58Threads fairness:events (avg/stddev): 7725.0000/0.00execution time (avg/stddev): 9.9966/0.00
内存
虚拟机1
soulio@vm-ubt1:~$ sysbench memory --memory-block-size=1M --memory-total-size=2G --memory-oper=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 timeRunning memory speed test with the following options:block size: 1024KiBtotal size: 2048MiBoperation: writescope: globalInitializing worker threads...Threads started!Total operations: 2048 ( 6334.09 per second)2048.00 MiB transferred (6334.09 MiB/sec)General statistics:total time: 0.3185stotal number of events: 2048Latency (ms):min: 0.15avg: 0.15max: 0.2895th percentile: 0.17sum: 315.02Threads fairness:events (avg/stddev): 2048.0000/0.00execution time (avg/stddev): 0.3150/0.00
对照组1
吞吐性能是虚拟机1的 4.5x
延迟是虚拟机1的 0.35x~ ❯ sysbench memory --memory-block-size=1M --memory-total-size=2G --memory-oper=write ru
n
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 timeRunning memory speed test with the following options:block size: 1024KiBtotal size: 2048MiBoperation: writescope: globalInitializing worker threads...Threads started!Total operations: 2048 (25949.52 per second)2048.00 MiB transferred (25949.52 MiB/sec)General statistics:total time: 0.0782stotal number of events: 2048Latency (ms):min: 0.04avg: 0.04max: 0.1095th percentile: 0.04sum: 77.58Threads fairness:events (avg/stddev): 2048.0000/0.00execution time (avg/stddev): 0.0776/0.00
IO基准测试
虚拟机1
soulio@vm-ubt1:~$ sysbench fileio --file-test-mode=rndrw --file-total-size=2G --max-time=300 --max-requests=0 run
WARNING: --max-time is deprecated, use --time instead
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 timeExtra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...Threads started!File operations:reads/s: 1210.70writes/s: 807.13fsyncs/s: 2582.91Throughput:read, MiB/s: 18.92written, MiB/s: 12.61General statistics:total time: 300.0214stotal number of events: 1380211Latency (ms):min: 0.01avg: 0.22max: 266.3895th percentile: 0.30sum: 297289.13Threads fairness:events (avg/stddev): 1380211.0000/0.00execution time (avg/stddev): 297.2891/0.00
对照组1
~ ❯ sysbench fileio --file-test-mode=rndrw --file-total-size=2G --max-time=300 --max-requests=0 run
WARNING: --max-time is deprecated, use --time instead
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 timeExtra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...Threads started!File operations:reads/s: 668.20writes/s: 445.46fsyncs/s: 1425.69Throughput:read, MiB/s: 10.44written, MiB/s: 6.96General statistics:total time: 300.0905stotal number of events: 761909Latency (ms):min: 0.00avg: 0.39max: 179.1795th percentile: 0.67sum: 299653.07Threads fairness:events (avg/stddev): 761909.0000/0.00execution time (avg/stddev): 299.6531/0.00