Weird slowdown connecting from macOS

I recently set up TrueNAS on a Beelink BE Mini, running an SMB server on a 3x4TB SSD RAIDv1 pool. The machine is connected to a 2.5Gbps hub, which is connected to a MacBook Pro in the same room over a 2.5Gbps USB Ethernet adapter. The hub has an upstream cable to the house 2.5Gbps hub, which then has a connection to a WiFi router. The MBP is configured for both the wired and wireless interfaces, but is instructed to prefer the wired connection. I’ve populated it with about 1TB of RAW files, plus a separate volume for Time Machine backups. The TM backups are regularly scheduled, and appear to be completing with no problem.

When I mount the SMB volume to the Mac and benchmark its speed using BlackMagic Disk Speed Test, I get about 196MB/s read and 240MB/s write. I’m pretty happy with these numbers, since the write speed appears to be close to saturating the 2.5Gbps Ethernet link. I’m curious about why the read speed is lower than write, but it isn’t the main objective of this post.

The big problem is this: when I keep the volume mounted and idle for a few hours, the speed inexplicably goes down all the way to 7-15MB/s! Quitting and restarting the benchmark app doesn’t change anything. However, when I dismount the volume and remount it, the speed goes right back up to 240MB/s. I have no idea what is going on.

I suspect that the problem is on the macOS side and not TrueNAS, but even that is mere speculation based on the fact that macOS’s SMB implementation is generally kind of problematic. It is very difficult to debug this problem, since the problem only appears to manifest itself after some undetermined amount of idle time. Has anyone seen this problem, and can offer a hint?

  1. The Mac is running Sequoia 15.4.1. TrueNAS’s version is 25.04.1.
  2. Both 2.5Gbps hubs are brand new, so I won’t rule out a fault in either of them. That said, it is unlikely, as the Mac doesn’t appear to have a problem talking to other devices or the Internet.
  3. Yes, I did play around quite a bit with /etc/nsmb.conf on the Mac to bring the SMB performance up to a tolerable level. This is what I have now:

$ cat /etc/nsmb.conf
mc_on=yes
mc_prefer_wired=yes
protocol_vers_map=6
#max_resp_timeout=600
signing_required=no
aapl_off=true
file_ids_off=yes
dir_cache_off=yes
dir_cache_max_cnt=0
notify_off=yes
port445=no_netbios
soft=yes
streams=yes
veto files=/._*/.DS_Store