file transfer from windows to linux is slower than from linux to windows

3

I have a linux workstation connected directly through 10G to a Windows machine. Strangely, file transfer from linux to Windows is fast (600 MB/s) whereas file transfer from windows to linux is slow (160 MB/s). I have tried mounting the Windows drive on linux through cifs and nfs, as well as mounting the linux drive on windows through nfs and I always get the same result.

I also tested windows to windows (I connected another windows machine to the first windows machine). I get then fast file transfer both ways. And I tested linux to linux : fast both ways.

I tested network speed using iperf, and it is high in both directions. It is only when I transfer files that I have problems.

Any suggestion welcome

Ben2209

Posted 2017-12-21T14:39:10.097

Reputation: 139

1In the slow Windows to Linux scenario are you "pushing" the file from Windows or are you "pulling" the file from Linux? Which machine is initiating the transfer? – Mokubai – 2017-12-21T14:51:28.023

With means absolutely nothing without checking the read and write speeds of both systems. What is the write speed of the Linux machines HDD compared to the write speed of the Windows machines HDD? I realize you tested this in other ways but your numbers are meaningless without a baseline is my point. – jdwolf – 2017-12-21T16:07:10.933

And you've missed out vital information like 1/ are you using the same file set for all the tests and 2/ have you rebooted both machines between tests to eliminate disk caching? 3/ What are the read/write speeds of the disks at each end? – DavidPostill – 2017-12-21T18:09:20.583

At least on linux you could do sync; echo 3 | sudo tee /proc/sys/vm/drop_caches to clears all caches, 1 maybe only clears the disk caches (reboots are so windows ;-) The drives might have their own internal caches too, especially if they're hybrids that decide to put whatever they feel like to SSD whenever they feel like it. – Xen2050 – 2017-12-22T01:37:44.247

The Linux disk is an SSD. The windows has 12 HDD in RAID0. Caching is not an issue, I have checked it out. Again, both computers are capable of about 600MB/s data transfer in read and write, as this was tested when the Linux computer was connected to another Linux computer, and when the windows computer was connected to another windows machine. – Ben2209 – 2017-12-22T09:10:26.523

Data is being pulled and pushed from windows – Ben2209 – 2017-12-22T09:11:42.073

Answers

1

Part of the bottleneck on the Linux side might be the write speed for the HDD. This may need to be optimized for writing many small files or a few large ones. In particular, the write-cache size can be changed and tested. The hdparam utility can be used to optimize disk usage.

To check current parameters, enter in terminal:

hdparm -I /dev/sda | more

To check write speed, enter:

hdparm -t /dev/sda

Some factors to change are the number of sectors written at a time and size of the write cache.

DrMoishe Pippik

Posted 2017-12-21T14:39:10.097

Reputation: 13 291