So I spent many moons trying to figure this out further including trying TrueNAS core, and messing about with NUMA settings in the BIOS but with no result. However, out of desperation, I tried to learn how to use FIO and assuming I have run realistic tests (I’m still not familiar with what all the arguments do), I got excellent results on the NVME striped pool directly on TrueNAS. I just can’t replicate them either on iSCSI, NFS or a VM directly in TrueNAS… I would have taken a guess that this a networking/NIC issue if wasn’t for the VM results directly on TrueNAS. Either that or Windows… I tried FIO in Debian and Windows over iSCSI and the random results were better but than CrystalDiskMark but the sequential was more or less the same. I got 50 - 60 MB/s (10 - 18K IOPS) on Windows and 30 - 40 MB/s (8 - 10K IOPS) on Debian. Both use the same FIO arguments as the results below are used directly on TrueNAS.
The only thing I can think of now is that this is to do with the Dual CPUs on the server. I’m hoping take one out and see if it makes any difference.
TEST1: (g=0): rw=rw, bs=(R) 128KiB-128KiB, (W) 128KiB-128KiB, (T) 128KiB-128KiB, ioengine=psync, iodepth=16
...
fio-3.28
Starting 16 processes
TEST1: (groupid=0, jobs=16): err= 0: pid=6745: Tue Feb 13 05:28:10 2024
read: IOPS=96.9k, BW=11.8GiB/s (12.7GB/s)(1419GiB/120001msec)
clat (usec): min=11, max=46859, avg=66.13, stdev=195.72
lat (usec): min=11, max=46859, avg=66.25, stdev=195.76
clat percentiles (usec):
| 1.00th=[ 19], 5.00th=[ 28], 10.00th=[ 33], 20.00th=[ 36],
| 30.00th=[ 38], 40.00th=[ 41], 50.00th=[ 45], 60.00th=[ 49],
| 70.00th=[ 56], 80.00th=[ 67], 90.00th=[ 91], 95.00th=[ 125],
| 99.00th=[ 412], 99.50th=[ 807], 99.90th=[ 2147], 99.95th=[ 3064],
| 99.99th=[ 7439]
bw ( MiB/s): min= 8517, max=17934, per=100.00%, avg=12124.46, stdev=97.73, samples=3808
iops : min=68134, max=143469, avg=96988.62, stdev=781.85, samples=3808
write: IOPS=97.0k, BW=11.8GiB/s (12.7GB/s)(1421GiB/120001msec); 0 zone resets
clat (usec): min=13, max=50678, avg=93.87, stdev=230.79
lat (usec): min=14, max=50680, avg=96.42, stdev=231.31
clat percentiles (usec):
| 1.00th=[ 26], 5.00th=[ 41], 10.00th=[ 48], 20.00th=[ 51],
| 30.00th=[ 55], 40.00th=[ 58], 50.00th=[ 63], 60.00th=[ 69],
| 70.00th=[ 77], 80.00th=[ 89], 90.00th=[ 123], 95.00th=[ 192],
| 99.00th=[ 750], 99.50th=[ 1172], 99.90th=[ 2606], 99.95th=[ 3654],
| 99.99th=[ 8455]
bw ( MiB/s): min= 8521, max=17901, per=100.00%, avg=12139.76, stdev=97.40, samples=3808
iops : min=68169, max=143203, avg=97111.14, stdev=779.19, samples=3808
lat (usec) : 20=1.00%, 50=38.25%, 100=49.08%, 250=9.19%, 500=1.32%
lat (usec) : 750=0.39%, 1000=0.22%
lat (msec) : 2=0.41%, 4=0.10%, 10=0.03%, 20=0.01%, 50=0.01%
lat (msec) : 100=0.01%
cpu : usr=3.71%, sys=67.74%, ctx=5972339, majf=0, minf=0
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=11625618,11640426,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=16
Run status group 0 (all jobs):
READ: bw=11.8GiB/s (12.7GB/s), 11.8GiB/s-11.8GiB/s (12.7GB/s-12.7GB/s), io=1419GiB (1524GB), run=120001-120001msec
WRITE: bw=11.8GiB/s (12.7GB/s), 11.8GiB/s-11.8GiB/s (12.7GB/s-12.7GB/s), io=1421GiB (1526GB), run=120001-120001msec
Sequential? results directly on the TrueNAS machine (100K - 120K IOPS)
TEST2: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=16
...
fio-3.28
Starting 16 processes
TEST2: (groupid=0, jobs=16): err= 0: pid=6916: Tue Feb 13 05:42:15 2024
read: IOPS=66.8k, BW=261MiB/s (274MB/s)(30.6GiB/120001msec)
clat (usec): min=2, max=75315, avg=57.21, stdev=87.24
lat (usec): min=2, max=75315, avg=57.37, stdev=87.26
clat percentiles (usec):
| 1.00th=[ 6], 5.00th=[ 8], 10.00th=[ 9], 20.00th=[ 10],
| 30.00th=[ 12], 40.00th=[ 14], 50.00th=[ 57], 60.00th=[ 70],
| 70.00th=[ 92], 80.00th=[ 102], 90.00th=[ 119], 95.00th=[ 135],
| 99.00th=[ 208], 99.50th=[ 262], 99.90th=[ 449], 99.95th=[ 562],
| 99.99th=[ 840]
bw ( KiB/s): min=204509, max=301640, per=100.00%, avg=267390.06, stdev=646.86, samples=3824
iops : min=51123, max=75402, avg=66841.87, stdev=161.75, samples=3824
write: IOPS=66.8k, BW=261MiB/s (274MB/s)(30.6GiB/120001msec); 0 zone resets
clat (usec): min=8, max=75312, avg=177.95, stdev=159.42
lat (usec): min=8, max=75313, avg=178.16, stdev=159.42
clat percentiles (usec):
| 1.00th=[ 57], 5.00th=[ 71], 10.00th=[ 77], 20.00th=[ 92],
| 30.00th=[ 111], 40.00th=[ 122], 50.00th=[ 141], 60.00th=[ 165],
| 70.00th=[ 194], 80.00th=[ 235], 90.00th=[ 310], 95.00th=[ 408],
| 99.00th=[ 717], 99.50th=[ 791], 99.90th=[ 922], 99.95th=[ 1123],
| 99.99th=[ 1418]
bw ( KiB/s): min=206722, max=297379, per=100.00%, avg=267455.24, stdev=544.66, samples=3824
iops : min=51676, max=74342, avg=66857.65, stdev=136.21, samples=3824
lat (usec) : 4=0.05%, 10=10.79%, 20=11.94%, 50=1.52%, 100=26.04%
lat (usec) : 250=40.69%, 500=7.40%, 750=1.17%, 1000=0.35%
lat (msec) : 2=0.03%, 4=0.01%, 10=0.01%, 20=0.01%, 50=0.01%
lat (msec) : 100=0.01%
cpu : usr=2.48%, sys=50.08%, ctx=7819836, majf=0, minf=0
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=8014925,8016768,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=16
Run status group 0 (all jobs):
READ: bw=261MiB/s (274MB/s), 261MiB/s-261MiB/s (274MB/s-274MB/s), io=30.6GiB (32.8GB), run=120001-120001msec
WRITE: bw=261MiB/s (274MB/s), 261MiB/s-261MiB/s (274MB/s-274MB/s), io=30.6GiB (32.8GB), run=120001-120001msec
4k random results directly on TrueNAS (66k IOPS)