From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 63B0E3858C2C for ; Wed, 25 Aug 2021 02:02:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 63B0E3858C2C Received: by mail-ej1-x635.google.com with SMTP id u14so23441624ejf.13 for ; Tue, 24 Aug 2021 19:02:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YXFb8HSEv46+Ai3j/8j++EnJZA7ASMErScW7cs7AMVU=; b=j8HftMbdzJ6cHD7OeNYYNkPeKRGLrSzwQ17m8PDHhOl2BwNC6cPpr9cF6LYh4dFgX7 9sJ0vdkutB5wCmZmwDRLRPnwwaIDypNh92+HZy4SyBjATvmCc/FzzyQhfGKdwsB05IKh d0H4/j/W4qFEFpo8F/ELZpwj4gTX3n3VFZfyTYWUKlQhQd5pP+6SubkR5dvViTQCpKOx 3qqlflKRgRFWMpHg2x+KtUPWPj1AmZwLgOhj30jP0V0FCqz+dpDrhiVW7dqxWJpzncsQ UpqL624aD0CNj5qQZLCy+urEh8Ba3Gex2YHcQXGB6tmZkbijzRXdKNBnP1ySuFX7g3z9 AcYQ== X-Gm-Message-State: AOAM533DVrL4CaKOn7/RAkduIJvkcaMQYqHvD+JzOrUTD1Vkxv3xWrTo Dyh+/ZYyzlbWL4nnRd7TfYEkDmKeyYrFOIZql64= X-Google-Smtp-Source: ABdhPJzpkfGpQ0G444IUBhQ1dib63gzUp4XAykPWdUabPzRA5esYLKSY6X4wCrSbVQtY7jABjfYdvZgwljM8dZ7rjX4= X-Received: by 2002:a17:906:585a:: with SMTP id h26mr44498665ejs.31.1629856969283; Tue, 24 Aug 2021 19:02:49 -0700 (PDT) MIME-Version: 1.0 References: <41A583E1-C8E7-42AB-9F24-EEC33A41EC60@house.org> In-Reply-To: <41A583E1-C8E7-42AB-9F24-EEC33A41EC60@house.org> From: NightStrike Date: Tue, 24 Aug 2021 16:02:39 -1000 Message-ID: Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? To: Chris Roehrig Cc: cygwin@cygwin.com X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2021 02:02:53 -0000 On Tue, Aug 24, 2021, 09:50 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. > > Thanks, > -- Chris > > > Windows 10 v2004 (64-bit) > CYGWIN_NT-10.0 .... 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64 Cygwin > rsync version 3.2.4dev protocol version 31 > Linux Mint 20 > Older versions of windows had a setting to optimize the OS for either background services or foreground applications. One of the things this did was throttle network usage. I don't know if windows 10 has the same setting though. >