cygrunsrv + sshd + rsync = 20 times too slow -- throttled?
Chris Roehrig
croehrig@house.org
Wed Aug 25 00:35:15 GMT 2021
Here's my test in a nutshell:
# ON WINDOWS: install Cygwin and enable cygsshd
ssh-host-config -y
# set up authorized keys, etc to make things easier
# LINUX: Create a 2GB random file on Linux:
dd if=/dev/urandom of=/tmp/bigfile.bin bs=1M count=2000
# WINDOWS: rsync "pull" to cygwin
LINUXHOST=mylinuxhost
rsync -Pva $LINUXHOST:/tmp/bigfile.bin /tmp/ # 100MB/s full speed
rm /tmp/bigfile.bin
# LINUX: rsync "push" to cygwin (from Linux machine)
WINHOST=mywindowshost
rsync -Pva /tmp/bigfile.bin $WINHOST:/tmp/ # slow, dropping to 4MB/s
I get the same results transferring the other direction (WIN -> LINUX): The Cygwin remote endpoint is always slow.
On Tue Aug 24 2021, at 4:43 PM, Mark Geisert <mark@maxrnd.com> wrote:
> Chris Roehrig wrote:
>> I have a network of Windows, Linux and Mac machines and I use rsync to synchronize various directories between them.
>> I'm trying to figure out why my rsync transfers are so slow (<4 MB/s) only when the remote endpoint is Cygwin rsync over sshd (with both a Linux or Cygwin rsync client). In all other scenarios, I get the full 100MB/s as expected from gigabit ethernet. This has been an ongoing problem for me for a couple of years over several Windows and Cygwin versions, and I'd like to try to fix it.
>> If I run rsync --daemon --no-detach under mintty in the foreground on the remote Windows endpoint, I get the full 100 MB/s transfers, so it seems like it has something to do with rsync.exe running in the background under the cygrunsrv+sshd service (which was installed normally using ssh-host-config).
>> If I do:
>> pv /dev/zero | ssh $WINHOST "cat > /dev/null"
>> or even
>> pv /dev/urandom | ssh $WINHOST md5sum
>> I also get the full 100 MB/s transfers, so it doesn't look like sshd itself is being throttled by bandwidth or CPU.
>> The machines have less than 15% CPU utilization while transferring, with each of the 4 cores less than 30%, so it doesn't look to be CPU issue.
>> In Task Manager, sshd.exe and rsync.exe seem to be running normally using only few percent CPU, and show Power Throttling=Disabled, Priority=Normal. Setting their Priority to High doesn't seem to change things.
>> Looking in Resource Monitor on the remote endpoint, the network usage is pretty much a flat horizontal line at about 18 Mbps (2.5 MB/s), so it sure looks to me as if rsync is somehow being bandwidth-throttled when run in the background under cygsshd.
>> It's almost as if rsync has an implicit --bwlimit override when it is run from cygrunsrv+sshd (I've tried --bwlimit=0 on the client which makes no difference).
>> Any ideas? Not sure where to go from here.
>
> You're not the first to report this. I don't have any quick answer. But can you give one or two simple examples of commands that give slow transfers in your environment? Simple like your 'pv' examples, if possible, using whatever method that works.
>
> ..mark
>
> --
> Problem reports: https://cygwin.com/problems.html
> FAQ: https://cygwin.com/faq/
> Documentation: https://cygwin.com/docs.html
> Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list