HP DL380 Gen10 服务器(双 Xeon Silver 4110 2.10GHz、128Gb RAM、qlogic qla2xxx)运行 debian 9.8,充当数据库服务器(percona server-5.6.43-84.3)。
Mysql 数据目录通过 FC 连接到 HPE MSA-2050(RAID 10,共 14 个 SAS HDD 900Gb 15K、一个磁盘组、一个池、一个 2.5 Tb 的 ext4 卷),速度为 16Gbps。使用一条光链路(无多路径)。
接下来发生的事情是:在测试随机读写速度时,使用sysbench
,速度约为 10/8 M/s,非常慢。因此,mysql I/O 也具有相同的速度。
但随着顺序读/写测试,速度增长到 800/600 M/s。当用于dd
写入数据、进行复制操作或任何顺序文件操作时,速度相同。
在 HPE MSA 中尝试了不同的池和卷选项 - 没有成功。
SAN 卷通过选项安装/dev/sde1 on /mysql-data type ext4 (rw,noatime,stripe=256,data=ordered)
通过这个测试:
sysbench --test=fileio --file-total-size=150G prepare sysbench --test=fileio --file-total-size=150G --file-test-mode=rndrd --max-time=100 --max-requests=0 run
结果是:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 1.1719GiB each
150GiB 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 read test
Initializing worker threads...
Threads started!
File operations:
reads/s: 561.86
writes/s: 0.00
fsyncs/s: 0.00
Throughput:
read, MiB/s: 8.78
written, MiB/s: 0.00
General statistics:
total time: 100.0053s
total number of events: 56191
Latency (ms):
min: 0.01
avg: 1.78
max: 111.23
95th percentile: 11.65
sum: 99924.80
Threads fairness:
events (avg/stddev): 56191.0000/0.00
execution time (avg/stddev): 99.9248/0.00
当开始时sysbench --test=fileio --file-total-size=150G --file-test-mode=seqrd --max-time=100 --max-requests=0 run
结果是:
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 1.1719GiB each
150GiB 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 read test
Initializing worker threads...
Threads started!
File operations:
reads/s: 31642.04
writes/s: 0.00
fsyncs/s: 0.00
Throughput:
read, MiB/s: 494.41
written, MiB/s: 0.00
General statistics:
total time: 100.0008s
total number of events: 3164351
Latency (ms):
min: 0.00
avg: 0.03
max: 32.77
95th percentile: 0.06
sum: 98523.42
Threads fairness:
events (avg/stddev): 3164351.0000/0.00
execution time (avg/stddev): 98.5234/0.00
随机写入和顺序写入的结果类似。
有什么问题吗?