I have hetzner AX61 server
2x sata ssd 240Gb for OS (zfs raid-1 uefi boot)
2x toshiba nvme u.2 KXD51RUE3T84 3.84Tb (for data)
Test with fio data pool
ZFS RAID-1
zfs pool ashift=12, atime=off, compression=off
Why so huge difference between this results? 42MB/s and 306MB/s...
Even old sata ssd have better performance in zfs mirror:
2x sata ssd 240Gb for OS (zfs raid-1 uefi boot)
2x toshiba nvme u.2 KXD51RUE3T84 3.84Tb (for data)
Test with fio data pool
ZFS RAID-1
zfs pool ashift=12, atime=off, compression=off
# zpool status
pool: rpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-SAMSUNG_MZ7WD240HAFV-00003_S16LNYAF402056-part3 ONLINE 0 0 0
ata-SAMSUNG_MZ7WD240HAFV-00003_S16LNYAD905297-part3 ONLINE 0 0 0
errors: No known data errors
pool: zfsr1nvme
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zfsr1nvme ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
nvme-KXD51RUE3T84_TOSHIBA_10JS1019T7UM ONLINE 0 0 0
nvme-KXD51RUE3T84_TOSHIBA_10JS101AT7UM ONLINE 0 0 0
errors: No known data errors
pool: rpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-SAMSUNG_MZ7WD240HAFV-00003_S16LNYAF402056-part3 ONLINE 0 0 0
ata-SAMSUNG_MZ7WD240HAFV-00003_S16LNYAD905297-part3 ONLINE 0 0 0
errors: No known data errors
pool: zfsr1nvme
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zfsr1nvme ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
nvme-KXD51RUE3T84_TOSHIBA_10JS1019T7UM ONLINE 0 0 0
nvme-KXD51RUE3T84_TOSHIBA_10JS101AT7UM ONLINE 0 0 0
errors: No known data errors
#fio --filename=/zfsr1nvme/test-fio.bin --name=random-write --ioengine=posixaio --rw=randwrite --bs=4k --size=4g --numjobs=1 --iodepth=1 --runtime=60 --time_based --end_fsync=1
random-write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=posixaio, iodepth=1
fio-3.12
Starting 1 process
Jobs: 1 (f=1): [w(1)][100.0%][w=30.9MiB/s][w=7910 IOPS][eta 00m:00s]
random-write: (groupid=0, jobs=1): err= 0: pid=46963: Fri May 29 13:35:43 2020
write: IOPS=10.3k, BW=40.4MiB/s (42.3MB/s)(2440MiB/60453msec); 0 zone resets
slat (nsec): min=341, max=185623, avg=1043.96, stdev=362.64
clat (usec): min=5, max=560, avg=94.64, stdev=49.68
lat (usec): min=6, max=562, avg=95.68, stdev=49.68
clat percentiles (usec):
| 1.00th=[ 8], 5.00th=[ 10], 10.00th=[ 12], 20.00th=[ 35],
| 30.00th=[ 47], 40.00th=[ 112], 50.00th=[ 114], 60.00th=[ 122],
| 70.00th=[ 135], 80.00th=[ 141], 90.00th=[ 143], 95.00th=[ 145],
| 99.00th=[ 149], 99.50th=[ 153], 99.90th=[ 165], 99.95th=[ 176],
| 99.99th=[ 221]
bw ( KiB/s): min=28512, max=153304, per=100.00%, avg=41693.09, stdev=15178.40, samples=119
iops : min= 7128, max=38326, avg=10423.27, stdev=3794.60, samples=119
lat (usec) : 10=5.43%, 20=8.49%, 50=16.89%, 100=2.46%, 250=66.73%
lat (usec) : 500=0.01%, 750=0.01%
cpu : usr=2.13%, sys=1.99%, ctx=624613, majf=1, minf=41
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
issued rwts: total=0,624555,0,1 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=40.4MiB/s (42.3MB/s), 40.4MiB/s-40.4MiB/s (42.3MB/s-42.3MB/s), io=2440MiB (2558MB), run=60453-60453msec
random-write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=posixaio, iodepth=1
fio-3.12
Starting 1 process
Jobs: 1 (f=1): [w(1)][100.0%][w=30.9MiB/s][w=7910 IOPS][eta 00m:00s]
random-write: (groupid=0, jobs=1): err= 0: pid=46963: Fri May 29 13:35:43 2020
write: IOPS=10.3k, BW=40.4MiB/s (42.3MB/s)(2440MiB/60453msec); 0 zone resets
slat (nsec): min=341, max=185623, avg=1043.96, stdev=362.64
clat (usec): min=5, max=560, avg=94.64, stdev=49.68
lat (usec): min=6, max=562, avg=95.68, stdev=49.68
clat percentiles (usec):
| 1.00th=[ 8], 5.00th=[ 10], 10.00th=[ 12], 20.00th=[ 35],
| 30.00th=[ 47], 40.00th=[ 112], 50.00th=[ 114], 60.00th=[ 122],
| 70.00th=[ 135], 80.00th=[ 141], 90.00th=[ 143], 95.00th=[ 145],
| 99.00th=[ 149], 99.50th=[ 153], 99.90th=[ 165], 99.95th=[ 176],
| 99.99th=[ 221]
bw ( KiB/s): min=28512, max=153304, per=100.00%, avg=41693.09, stdev=15178.40, samples=119
iops : min= 7128, max=38326, avg=10423.27, stdev=3794.60, samples=119
lat (usec) : 10=5.43%, 20=8.49%, 50=16.89%, 100=2.46%, 250=66.73%
lat (usec) : 500=0.01%, 750=0.01%
cpu : usr=2.13%, sys=1.99%, ctx=624613, majf=1, minf=41
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
issued rwts: total=0,624555,0,1 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=40.4MiB/s (42.3MB/s), 40.4MiB/s-40.4MiB/s (42.3MB/s-42.3MB/s), io=2440MiB (2558MB), run=60453-60453msec
# fio --filename=/dev/nvme0n1 --name=random-write --ioengine=posixaio --rw=randwrite --bs=4k --size=4g --numjobs=1 --iodepth=1 --runtime=60 --time_based --end_fsync=1
random-write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=posixaio, iodepth=1
fio-3.12
Starting 1 process
Jobs: 1 (f=1): [F(1)][100.0%][eta 00m:00s]
random-write: (groupid=0, jobs=1): err= 0: pid=62193: Fri May 29 13:57:13 2020
write: IOPS=74.7k, BW=292MiB/s (306MB/s)(17.7GiB/62150msec); 0 zone resets
slat (nsec): min=330, max=191796, avg=1217.38, stdev=326.49
clat (nsec): min=260, max=778174, avg=6823.75, stdev=2969.88
lat (usec): min=3, max=779, avg= 8.04, stdev= 3.26
clat percentiles (nsec):
| 1.00th=[ 3312], 5.00th=[ 3440], 10.00th=[ 3504], 20.00th=[ 3632],
| 30.00th=[ 3696], 40.00th=[ 4256], 50.00th=[ 8896], 60.00th=[ 9152],
| 70.00th=[ 9280], 80.00th=[ 9408], 90.00th=[ 9664], 95.00th=[10048],
| 99.00th=[11200], 99.50th=[12224], 99.90th=[14272], 99.95th=[16064],
| 99.99th=[19072]
bw ( KiB/s): min=37368, max=808168, per=100.00%, avg=459929.64, stdev=201721.42, samples=80
iops : min= 9344, max=202042, avg=114982.47, stdev=50430.27, samples=80
lat (nsec) : 500=0.01%
lat (usec) : 4=38.02%, 10=57.08%, 20=4.90%, 50=0.01%, 100=0.01%
lat (usec) : 250=0.01%, 500=0.01%, 750=0.01%, 1000=0.01%
cpu : usr=13.35%, sys=25.34%, ctx=4905240, majf=0, minf=48
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
issued rwts: total=0,4645696,0,1 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=292MiB/s (306MB/s), 292MiB/s-292MiB/s (306MB/s-306MB/s), io=17.7GiB (19.0GB), run=62150-62150msec
Disk stats (read/write):
nvme0n1: ios=95/319560, merge=0/4325957, ticks=11/7698292, in_queue=7091352, util=34.76%
random-write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=posixaio, iodepth=1
fio-3.12
Starting 1 process
Jobs: 1 (f=1): [F(1)][100.0%][eta 00m:00s]
random-write: (groupid=0, jobs=1): err= 0: pid=62193: Fri May 29 13:57:13 2020
write: IOPS=74.7k, BW=292MiB/s (306MB/s)(17.7GiB/62150msec); 0 zone resets
slat (nsec): min=330, max=191796, avg=1217.38, stdev=326.49
clat (nsec): min=260, max=778174, avg=6823.75, stdev=2969.88
lat (usec): min=3, max=779, avg= 8.04, stdev= 3.26
clat percentiles (nsec):
| 1.00th=[ 3312], 5.00th=[ 3440], 10.00th=[ 3504], 20.00th=[ 3632],
| 30.00th=[ 3696], 40.00th=[ 4256], 50.00th=[ 8896], 60.00th=[ 9152],
| 70.00th=[ 9280], 80.00th=[ 9408], 90.00th=[ 9664], 95.00th=[10048],
| 99.00th=[11200], 99.50th=[12224], 99.90th=[14272], 99.95th=[16064],
| 99.99th=[19072]
bw ( KiB/s): min=37368, max=808168, per=100.00%, avg=459929.64, stdev=201721.42, samples=80
iops : min= 9344, max=202042, avg=114982.47, stdev=50430.27, samples=80
lat (nsec) : 500=0.01%
lat (usec) : 4=38.02%, 10=57.08%, 20=4.90%, 50=0.01%, 100=0.01%
lat (usec) : 250=0.01%, 500=0.01%, 750=0.01%, 1000=0.01%
cpu : usr=13.35%, sys=25.34%, ctx=4905240, majf=0, minf=48
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
issued rwts: total=0,4645696,0,1 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=292MiB/s (306MB/s), 292MiB/s-292MiB/s (306MB/s-306MB/s), io=17.7GiB (19.0GB), run=62150-62150msec
Disk stats (read/write):
nvme0n1: ios=95/319560, merge=0/4325957, ticks=11/7698292, in_queue=7091352, util=34.76%
Why so huge difference between this results? 42MB/s and 306MB/s...
Even old sata ssd have better performance in zfs mirror:
# fio --filename=/tmp/test-fio.bin --name=random-write --ioengine=posixaio --rw=randwrite --bs=4k --size=4g --numjobs=1 --iodepth=1 --runtime=60 --time_based --end_fsync=1
random-write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=posixaio, iodepth=1
fio-3.12
Starting 1 process
Jobs: 1 (f=1): [F(1)][100.0%][w=7755KiB/s][w=1938 IOPS][eta 00m:00s]
random-write: (groupid=0, jobs=1): err= 0: pid=47846: Fri May 29 14:34:10 2020
write: IOPS=21.0k, BW=85.8MiB/s (90.0MB/s)(5229MiB/60910msec); 0 zone resets
slat (nsec): min=340, max=202386, avg=1385.65, stdev=581.93
clat (nsec): min=130, max=5498.6k, avg=42997.68, stdev=43586.78
lat (usec): min=6, max=5501, avg=44.38, stdev=43.59
clat percentiles (usec):
| 1.00th=[ 8], 5.00th=[ 9], 10.00th=[ 10], 20.00th=[ 12],
| 30.00th=[ 13], 40.00th=[ 14], 50.00th=[ 16], 60.00th=[ 39],
| 70.00th=[ 46], 80.00th=[ 111], 90.00th=[ 116], 95.00th=[ 118],
| 99.00th=[ 125], 99.50th=[ 149], 99.90th=[ 180], 99.95th=[ 208],
| 99.99th=[ 498]
bw ( KiB/s): min=55168, max=217128, per=100.00%, avg=89147.58, stdev=30842.68, samples=119
iops : min=13792, max=54282, avg=22286.88, stdev=7710.68, samples=119
lat (nsec) : 250=0.01%
lat (usec) : 4=0.01%, 10=12.97%, 20=41.88%, 50=18.04%, 100=4.31%
lat (usec) : 250=22.76%, 500=0.02%, 750=0.01%, 1000=0.01%
lat (msec) : 2=0.01%, 4=0.01%, 10=0.01%
cpu : usr=4.16%, sys=4.60%, ctx=1338783, majf=0, minf=46
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
issued rwts: total=0,1338513,0,1 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=85.8MiB/s (90.0MB/s), 85.8MiB/s-85.8MiB/s (90.0MB/s-90.0MB/s), io=5229MiB (5483MB), run=60910-60910msec
random-write: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=posixaio, iodepth=1
fio-3.12
Starting 1 process
Jobs: 1 (f=1): [F(1)][100.0%][w=7755KiB/s][w=1938 IOPS][eta 00m:00s]
random-write: (groupid=0, jobs=1): err= 0: pid=47846: Fri May 29 14:34:10 2020
write: IOPS=21.0k, BW=85.8MiB/s (90.0MB/s)(5229MiB/60910msec); 0 zone resets
slat (nsec): min=340, max=202386, avg=1385.65, stdev=581.93
clat (nsec): min=130, max=5498.6k, avg=42997.68, stdev=43586.78
lat (usec): min=6, max=5501, avg=44.38, stdev=43.59
clat percentiles (usec):
| 1.00th=[ 8], 5.00th=[ 9], 10.00th=[ 10], 20.00th=[ 12],
| 30.00th=[ 13], 40.00th=[ 14], 50.00th=[ 16], 60.00th=[ 39],
| 70.00th=[ 46], 80.00th=[ 111], 90.00th=[ 116], 95.00th=[ 118],
| 99.00th=[ 125], 99.50th=[ 149], 99.90th=[ 180], 99.95th=[ 208],
| 99.99th=[ 498]
bw ( KiB/s): min=55168, max=217128, per=100.00%, avg=89147.58, stdev=30842.68, samples=119
iops : min=13792, max=54282, avg=22286.88, stdev=7710.68, samples=119
lat (nsec) : 250=0.01%
lat (usec) : 4=0.01%, 10=12.97%, 20=41.88%, 50=18.04%, 100=4.31%
lat (usec) : 250=22.76%, 500=0.02%, 750=0.01%, 1000=0.01%
lat (msec) : 2=0.01%, 4=0.01%, 10=0.01%
cpu : usr=4.16%, sys=4.60%, ctx=1338783, majf=0, minf=46
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.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.0%, >=64=0.0%
issued rwts: total=0,1338513,0,1 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=85.8MiB/s (90.0MB/s), 85.8MiB/s-85.8MiB/s (90.0MB/s-90.0MB/s), io=5229MiB (5483MB), run=60910-60910msec