我刚刚在三星 870 QVO 2TB 上安装了 ubuntu-server 22.04.1。使用 fio 测试时,我发现 IOPS 非常慢,但只得到 r=3100、w=1200 IOPS。这似乎比我应该得到的要低得多。有什么想法吗?我确实验证了它正在使用 SATA3 链接。
sudo fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=1G --readwrite=randrw --rwmixread=75
test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=64
fio-3.28
Starting 1 process
Jobs: 1 (f=1): [m(1)][100.0%][r=14.2MiB/s,w=4716KiB/s][r=3631,w=1179 IOPS][eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=1206: Sun Sep 25 11:36:07 2022
read: IOPS=3600, BW=14.1MiB/s (14.7MB/s)(768MiB/54580msec)
bw ( KiB/s): min=12808, max=15304, per=100.00%, avg=14405.21, stdev=316.65, samples=109
iops : min= 3202, max= 3826, avg=3601.30, stdev=79.18, samples=109
write: IOPS=1202, BW=4811KiB/s (4926kB/s)(256MiB/54580msec); 0 zone resets
bw ( KiB/s): min= 4280, max= 5464, per=100.00%, avg=4812.33, stdev=219.14, samples=109
iops : min= 1070, max= 1366, avg=1203.08, stdev=54.79, samples=109
cpu : usr=1.37%, sys=27.04%, ctx=261891, majf=0, minf=7
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
issued rwts: total=196498,65646,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=64
Run status group 0 (all jobs):
READ: bw=14.1MiB/s (14.7MB/s), 14.1MiB/s-14.1MiB/s (14.7MB/s-14.7MB/s), io=768MiB (805MB), run=54580-54580msec
WRITE: bw=4811KiB/s (4926kB/s), 4811KiB/s-4811KiB/s (4926kB/s-4926kB/s), io=256MiB (269MB), run=54580-54580msec
Disk stats (read/write):
sda: ios=195694/65460, merge=71/35, ticks=78794/11545, in_queue=90360, util=99.88%
答案1
我在 BIOS 中发现了这个问题。SATA 设置为使用 ATA 而不是 ACHI 模式。现在我得到了 80k IOPS