Very slow outbound (iperf measured) but normal inbound LAN transfers (PR4100)

I recently started experiencing slow outbound transfers (files originating from the PR4100) to my gigabit ethernet LAN but with expected inbound transfer speed. I see this using ssh or smb on the LAN - files go into the device fast but coming out of the device is at least 10x slower. Here’s an isolated iperf analysis, the other machine has no inbound/outbound speed issues and there are no other devices reading/writing to the WD device.

The data listed below indicate there is something slowing down the outbound traffic from this device. The disk array read/write are normal speeds, the inbound network speeds are also reasonable.


Data transferred to WD
Seeing above 100MB/s which is normal for my network

root@MyCloudPR4100 root # iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.101.123 port 5001 connected with 192.168.101.80 port 52508
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  1.11 GBytes   946 Mbits/sec

Data transferred out of the WD
Here’s where things get ugly, about 8MB/s coming from the device

root@MyCloudPR4100 root # iperf -c 192.168.101.80
------------------------------------------------------------
Client connecting to dev.privategiant.com, TCP port 5001
TCP window size: 45.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.101.123 port 58039 connected with 192.168.101.80 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.1 sec  81.6 MBytes  67.6 Mbits/sec

To help isolate the network, I ran some disk tests. Disk read and write speeds are not the bottle neck here

HDparm read test
Sitting about 390MB/s for the raid 5 md device which is expected

root@MyCloudPR4100 Video # hdparm -t /dev/md1
/dev/md1:
 Timing buffered disk reads: 1176 MB in  3.00 seconds = 391.83 MB/sec

dd write speed test
Slower on the write but that’s expected as well at 260MB/s

root@MyCloudPR4100 Video # dd if=/dev/zero of=/mnt/HD/HD_a2/media/Video/testfile bs=1000k count=1k && sync
1024+0 records in
1024+0 records out
1048576000 bytes (1000.0MB) copied, 3.837883 seconds, 260.6MB/s

rsync write to usb device
This is limited by the USB3 device I have

root@MyCloudPR4100 Video # rsync --progress file.mp4 /mnt/USB/USB1
_e1/
dry_total_size:1720299091
file.mp4
   207781888  12%   99.11MB/s    0:00:14

One thing I note – why is the TCP window size different between Client and Server modes? Typically they should be the same. Is there distance between these two nodes involved in the test, or are they on the same switch?

Is either end exhibiting physical layer errors / dropped packets?

Same switch and have changed ports during testing - same result. Other linux-linux machines on this switch do not exhibit this issue. I just put those two machines on a different switch and have the same results as above.

Here’s the output of netstat, I do see some dropped packets

root@MyCloudPR4100 Video # netstat -s
Ip:
    21189108 total packets received
    9 with invalid addresses
    3 forwarded
    0 incoming packets discarded
    21156548 incoming packets delivered
    25126632 requests sent out
    412 outgoing packets dropped
    210 dropped because of missing route
    ...

Anything else to check

On a local net, drops are suspicious. Check to see if they’re physical layer versus TCP.