Slow write speeds to nvme array

Have just set up a new TrueNAS scale server and am having some performance issues.

Hardware:
CPU: Intel Core Ultra 5 245K
RAM: PNY Performance 32GB (2 x 16GB) DDR5 5600MHz
NIC: Intel X520-DA1, connected to

  • PCI_E4 Gen PCIe 4.0 supports up to x4 (From Chipset)

Motherboard: MSI PRO B860M-A
OS: ElectricEel-24.10.2
Storage: 3x Lexar NM790 4TB (RAID Z1)

  • M.2_1 Source (From CPU) supports up to PCIe 5.0 x4
  • M.2_2 Source (From Chipset) supports up to PCIe 4.0 x4
  • M.2_3 Source (From Chipset) supports up to PCIe 4.0 x2

System Configuration:
3x NM790 drives are set up in a RAID Z1 Pool and SMB share was created.
Dataset options all default.

Symptoms:
Read speeds using Windows file copy from the array are perfect, stable at approx 1GB/s.

Write speeds using Windows file copy and SCP to the array are degraded, ranging from 150 - 300 MB/s.

Testing:
iperf results as below:

Accepted connection from 10.0.0.100, port 51108
[  5] local 10.0.0.61 port 5201 connected to 10.0.0.100 port 51109
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  1.09 GBytes  9.39 Gbits/sec                  
[  5]   1.00-2.00   sec  1.10 GBytes  9.44 Gbits/sec                  
[  5]   2.00-3.00   sec  1.10 GBytes  9.48 Gbits/sec                  
[  5]   3.00-4.00   sec  1.07 GBytes  9.17 Gbits/sec                  
[  5]   4.00-5.00   sec  1.10 GBytes  9.41 Gbits/sec                  
[  5]   5.00-6.00   sec  1.09 GBytes  9.33 Gbits/sec                  
[  5]   6.00-7.00   sec  1.06 GBytes  9.07 Gbits/sec                  
[  5]   7.00-8.00   sec  1.10 GBytes  9.42 Gbits/sec                  
[  5]   8.00-9.00   sec  1.10 GBytes  9.44 Gbits/sec                  
[  5]   9.00-10.00  sec  1.10 GBytes  9.47 Gbits/sec                  
[  5]  10.00-10.01  sec  7.13 MBytes  9.46 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.01  sec  10.9 GBytes  9.36 Gbits/sec                  receiver

fio results as below:

truenas_admin@neptune[/mnt/nvme_pool/storage]$ fio --ramp_time=5 --gtod_reduce=1 --numjobs=1 --bs=1M --size=100G --runtime=60s --readwrite=write --name=testfile
testfile: (g=0): rw=write, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=psync, iodepth=1
fio-3.33
Starting 1 process
testfile: Laying out IO file (1 file / 102400MiB)
Jobs: 1 (f=1): [W(1)][76.9%][w=5236MiB/s][w=5236 IOPS][eta 00m:06s]
testfile: (groupid=0, jobs=1): err= 0: pid=28509: Fri Mar 14 02:59:36 2025
  write: IOPS=5038, BW=5039MiB/s (5284MB/s)(72.3GiB/14691msec); 0 zone resets
   bw (  MiB/s): min= 4162, max= 5928, per=99.97%, avg=5037.57, stdev=488.08, samples=29
   iops        : min= 4162, max= 5928, avg=5037.38, stdev=488.15, samples=29
  cpu          : usr=2.27%, sys=50.04%, ctx=95388, majf=0, minf=38
  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,74027,0,0 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=5039MiB/s (5284MB/s), 5039MiB/s-5039MiB/s (5284MB/s-5284MB/s), io=72.3GiB (77.6GB), run=14691-14691msec

I have tried splitting the drives into individual pools and testing them individually and I have noticed the same result.

  1. Confirm that the dataset you are writing to has sync=standard.

  2. I think we will need to understand how your NVMes use PCIe lanes. What is your MB? Are the NM790s in MB M.2 slots or on a PCIe card and if so what card?

1 Like

Thanks for your reply!

  1. I confirm that sync = standard
  2. Updated OP. NVMe drives connected to MB. NIC connected to chipset PCIE slot.

EDIT: I’ve just tried to use the CPU PCIE slot ("PCI_E1 Gen PCIe 5.0 supports up to x16 (From CPU) ") and transfer speeds are identical.

Could your write speed from your Windows machine be limited by the speed you can read the files of the Windows disk?

I don’t believe so.

I have a second TrueNAS (Core) server that I will be migrating from which consists of 7x 4TB WD Red Plus drives. I get about 600MB/s uploading to that one.

Can you repeat your iperf3 with -R flag to test opposite direction ?

Interesting…

Ran a few more iperf tests, output from client (Windows PC)

C:\TEMP\iperf-3.18-win64>iperf3 -c 10.0.0.61 -R
Connecting to host 10.0.0.61, port 5201
Reverse mode, remote host 10.0.0.61 is sending
[  5] local 10.0.0.100 port 57723 connected to 10.0.0.61 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.01   sec   886 MBytes  7.32 Gbits/sec
[  5]   1.01-2.01   sec   874 MBytes  7.39 Gbits/sec
[  5]   2.01-3.00   sec   875 MBytes  7.40 Gbits/sec
[  5]   3.00-4.01   sec   892 MBytes  7.42 Gbits/sec
[  5]   4.01-5.00   sec   865 MBytes  7.31 Gbits/sec
[  5]   5.00-6.01   sec   878 MBytes  7.31 Gbits/sec
[  5]   6.01-7.00   sec   872 MBytes  7.37 Gbits/sec
[  5]   7.00-8.01   sec   880 MBytes  7.32 Gbits/sec
[  5]   8.01-9.00   sec   875 MBytes  7.39 Gbits/sec
[  5]   9.00-10.01  sec   898 MBytes  7.47 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.01  sec  8.59 GBytes  7.37 Gbits/sec  195            sender
[  5]   0.00-10.01  sec  8.59 GBytes  7.37 Gbits/sec                  receiver

iperf Done.

However if I do it with -P 4 as well

C:\TEMP\iperf-3.18-win64>iperf3.exe -c 10.0.0.61 -P 4 -R
Connecting to host 10.0.0.61, port 5201
Reverse mode, remote host 10.0.0.61 is sending
[  5] local 10.0.0.100 port 57797 connected to 10.0.0.61 port 5201
[  7] local 10.0.0.100 port 57798 connected to 10.0.0.61 port 5201
[  9] local 10.0.0.100 port 57799 connected to 10.0.0.61 port 5201
[ 11] local 10.0.0.100 port 57800 connected to 10.0.0.61 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   350 MBytes  2.93 Gbits/sec
[  7]   0.00-1.00   sec   223 MBytes  1.87 Gbits/sec
[  9]   0.00-1.00   sec   268 MBytes  2.24 Gbits/sec
[ 11]   0.00-1.00   sec   297 MBytes  2.49 Gbits/sec
[SUM]   0.00-1.00   sec  1.11 GBytes  9.54 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   1.00-2.00   sec   339 MBytes  2.84 Gbits/sec
[  7]   1.00-2.00   sec   303 MBytes  2.54 Gbits/sec
[  9]   1.00-2.00   sec   274 MBytes  2.30 Gbits/sec
[ 11]   1.00-2.00   sec   216 MBytes  1.80 Gbits/sec
[SUM]   1.00-2.00   sec  1.11 GBytes  9.47 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   2.00-3.01   sec   400 MBytes  3.34 Gbits/sec
[  7]   2.00-3.01   sec   188 MBytes  1.57 Gbits/sec
[  9]   2.00-3.01   sec   316 MBytes  2.64 Gbits/sec
[ 11]   2.00-3.01   sec   208 MBytes  1.74 Gbits/sec
[SUM]   2.00-3.01   sec  1.09 GBytes  9.30 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   3.01-4.01   sec   252 MBytes  2.10 Gbits/sec
[  7]   3.01-4.01   sec   312 MBytes  2.60 Gbits/sec
[  9]   3.01-4.01   sec   278 MBytes  2.32 Gbits/sec
[ 11]   3.01-4.01   sec   241 MBytes  2.01 Gbits/sec
[SUM]   3.01-4.01   sec  1.06 GBytes  9.02 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   4.01-5.00   sec   262 MBytes  2.22 Gbits/sec
[  7]   4.01-5.00   sec   284 MBytes  2.41 Gbits/sec
[  9]   4.01-5.00   sec   282 MBytes  2.39 Gbits/sec
[ 11]   4.01-5.00   sec   282 MBytes  2.40 Gbits/sec
[SUM]   4.01-5.00   sec  1.08 GBytes  9.42 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   5.00-6.01   sec   253 MBytes  2.11 Gbits/sec
[  7]   5.00-6.01   sec   271 MBytes  2.26 Gbits/sec
[  9]   5.00-6.01   sec   290 MBytes  2.42 Gbits/sec
[ 11]   5.00-6.01   sec   302 MBytes  2.52 Gbits/sec
[SUM]   5.00-6.01   sec  1.09 GBytes  9.31 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   6.01-7.01   sec   298 MBytes  2.49 Gbits/sec
[  7]   6.01-7.01   sec   206 MBytes  1.72 Gbits/sec
[  9]   6.01-7.01   sec   322 MBytes  2.69 Gbits/sec
[ 11]   6.01-7.01   sec   216 MBytes  1.80 Gbits/sec
[SUM]   6.01-7.01   sec  1.02 GBytes  8.70 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   7.01-8.02   sec   304 MBytes  2.54 Gbits/sec
[  7]   7.01-8.02   sec   253 MBytes  2.11 Gbits/sec
[  9]   7.01-8.02   sec   246 MBytes  2.05 Gbits/sec
[ 11]   7.01-8.02   sec   205 MBytes  1.71 Gbits/sec
[SUM]   7.01-8.02   sec  1008 MBytes  8.42 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   8.02-9.00   sec   190 MBytes  1.61 Gbits/sec
[  7]   8.02-9.00   sec   240 MBytes  2.04 Gbits/sec
[  9]   8.02-9.00   sec   297 MBytes  2.52 Gbits/sec
[ 11]   8.02-9.00   sec   214 MBytes  1.81 Gbits/sec
[SUM]   8.02-9.00   sec   940 MBytes  7.97 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   9.00-10.01  sec   250 MBytes  2.09 Gbits/sec
[  7]   9.00-10.01  sec   228 MBytes  1.91 Gbits/sec
[  9]   9.00-10.01  sec   315 MBytes  2.63 Gbits/sec
[ 11]   9.00-10.01  sec   244 MBytes  2.04 Gbits/sec
[SUM]   9.00-10.01  sec  1.01 GBytes  8.66 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.02  sec  2.83 GBytes  2.43 Gbits/sec  7101            sender
[  5]   0.00-10.01  sec  2.83 GBytes  2.43 Gbits/sec                  receiver
[  7]   0.00-10.02  sec  2.45 GBytes  2.10 Gbits/sec  1494            sender
[  7]   0.00-10.01  sec  2.45 GBytes  2.10 Gbits/sec                  receiver
[  9]   0.00-10.02  sec  2.82 GBytes  2.42 Gbits/sec  6674            sender
[  9]   0.00-10.01  sec  2.82 GBytes  2.42 Gbits/sec                  receiver
[ 11]   0.00-10.02  sec  2.37 GBytes  2.03 Gbits/sec  1140            sender
[ 11]   0.00-10.01  sec  2.37 GBytes  2.03 Gbits/sec                  receiver
[SUM]   0.00-10.02  sec  10.5 GBytes  8.99 Gbits/sec  16409             sender
[SUM]   0.00-10.01  sec  10.5 GBytes  8.98 Gbits/sec                  receiver

iperf Done.
``

iperf between my two servers, both connected to the same switch:

root@jupiter[~]# iperf3 -c 10.0.0.61
Connecting to host 10.0.0.61, port 5201
[  5] local 10.0.0.26 port 49066 connected to 10.0.0.61 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  1.09 GBytes  9.38 Gbits/sec    1   1.76 MBytes
[  5]   1.00-2.00   sec  1.10 GBytes  9.41 Gbits/sec    0   2.50 MBytes
[  5]   2.00-3.00   sec  1.10 GBytes  9.41 Gbits/sec    0   3.06 MBytes
[  5]   3.00-4.00   sec  1.09 GBytes  9.40 Gbits/sec   13   2.06 MBytes
[  5]   4.00-5.00   sec  1.10 GBytes  9.41 Gbits/sec    0   2.71 MBytes
[  5]   5.00-6.00   sec  1.10 GBytes  9.41 Gbits/sec    0   3.24 MBytes
[  5]   6.00-7.00   sec  1.10 GBytes  9.41 Gbits/sec    0   3.69 MBytes
[  5]   7.00-8.00   sec  1.10 GBytes  9.41 Gbits/sec    0   4.09 MBytes
[  5]   8.00-9.00   sec  1.10 GBytes  9.41 Gbits/sec    0   4.17 MBytes
[  5]   9.00-10.00  sec  1.10 GBytes  9.41 Gbits/sec    0   4.17 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  11.0 GBytes  9.41 Gbits/sec   14             sender
[  5]   0.00-10.00  sec  11.0 GBytes  9.41 Gbits/sec                  receiver

iperf Done.
root@jupiter[~]# iperf3 -c 10.0.0.61 -R
Connecting to host 10.0.0.61, port 5201
Reverse mode, remote host 10.0.0.61 is sending
[  5] local 10.0.0.26 port 18274 connected to 10.0.0.61 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  1.08 GBytes  9.27 Gbits/sec
[  5]   1.00-2.00   sec  1.08 GBytes  9.26 Gbits/sec
[  5]   2.00-3.00   sec  1.09 GBytes  9.37 Gbits/sec
[  5]   3.00-4.00   sec  1.10 GBytes  9.41 Gbits/sec
[  5]   4.00-5.00   sec  1.09 GBytes  9.39 Gbits/sec
[  5]   5.00-6.00   sec  1.09 GBytes  9.39 Gbits/sec
[  5]   6.00-7.00   sec  1.09 GBytes  9.39 Gbits/sec
[  5]   7.00-8.00   sec  1.10 GBytes  9.41 Gbits/sec
[  5]   8.00-9.00   sec  1.09 GBytes  9.33 Gbits/sec
[  5]   9.00-10.00  sec  1.09 GBytes  9.41 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  10.9 GBytes  9.37 Gbits/sec    0             sender
[  5]   0.00-10.00  sec  10.9 GBytes  9.36 Gbits/sec                  receiver

iperf Done.

Is this leaning towards more of a network issue between my Windows PC and the rest of the network?

This looks good

Check MTU size and set to 9000 on NAS, 9014 on Windows

Check whether SMB multichannel is enabled on both TrueNAS and Windows sides.

Set-SmbClientConfiguration -EnableMultiChannel $true

Check whether RSS is enabled on Windows

Get-NetAdapterRSS

And check that you see multiple connections on Windows to TrueNAS’s share :

Get-SmbConnection Get-SmbMultichannelConnection

2 Likes

You sir, are a wizard!

MTU size changed on NAS and Windows, Jumbo Frames enabled on switch.

SMB multichannel configured on both TrueNAS and Windows.

SMB speeds are now 900-1000MB/s both ways.

Thank you for your help!

1 Like