10Gbe weird performance issue with Intel X540-T2 NIC

Hello there,

I have some questions regarding the performance I’m observing with my Intel X540-T2 NIC on my TrueNAS server.

I’m seeing some weirdness, and I would like some insights.

My tests have been done between my TrueNAS server (Intel X540-T2), my PC (Aquantia 10Gbe), and my NAS (Aquantia 10Gbe)
My NAS is plugged in my Ubiquiti aggregation 10Gbe switch which is located in my garage.
TrueNAS server and PC are both plugged in a Ubiquiti Flex XG 10Gbe switch in my office.

The TrueNAS server has 64GB RAM, 2x 4 8TB SSD VDEV in RAIDZ1 as my storage pool (so it seems I should not be limited here), and an i5 12600K on a Q670 mobo where all the SSD are plugged in the native chipset SATA ports.

The PC is based on Ryzen 5900X, with 32GB RAM, on a X570 mobo, using a Samsung 970 Pro PCI-E 4.0 NVME drive for my tests.

The NAS is a Synology DS-1819+, with 16GB of RAM, having a 7x 14GB 7200rpm drives in RAID5, and the 10Gbe Network card which also allow installing 2 NVME drives (I can’t remember its name right now)

When I do a file copy from my NAS to my PC, I see around 800MB/s
When I do a file copy from my NAS to the TrueNAS server, I see around 400MB/s
When I do a file copy from my PC to the TrueNAS server, I see around 400MB/s
(didn’t try a copy from TrueNAS to my PC though)

So I thought there was a problem with my Intel NIC (that maybe I bought some Chinese copy for example)
Today, I tried to put the Aquantia NIC from my PC into the TrueNAS server, and the Intel NIC in my PC, and:

File copy from NAS to my PC: around 700MB/s
File copy from NAS to TrueNAS: 400MB/s
File copy from PC to TrueNAS: 1GB/s
File copy from TrueNAS to PC: 1GB/s

What the hell is going on here?

I know you guys won’t be able to tell me what’s going on as there are way too many parameters on play here, but at least if I could get some guidance in order to narrow down the source of the problem, that’d be really helpful!
I have to admit I’m out of ideas here.

Thank you