delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/08/25/13:53:05

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E002C385B805
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1629913983;
bh=w+3gBxPY2nM1yaI2ImgHPjgeLjwmlpP0hSRmFj3UFu4=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=BTNAo/5FD/9NTrshVTuquz+WIXOsLLXpbDmy0MgBAelAgyaiWnx7p9vwL+YrFMd7l
s8JtOwiGPSv0AASdA2jE6CXGHLSR//5j6okrq1c/X5Qur80nUh9q3r8YnzsvK5UmxL
oS19VrcSUPVH1Nj1N9mDz83el/U6BkxNKDxeBYKQ=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 76344385782E
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=NGpaWHOZ78DwNeL0uvCGTKlquTFKEGc5zJX7o/nTl0BCVzVsL2NAQ5SETTdrHeUzM1t+Z4smaLJ903iAsm4iaZKv27gN5tXdSGSnf5PBE2l9lwNkGd4Qi/SpXY1IPZ+qU8KV3KcYe1ncdxRlccXAxVzA2kMDurOdoRlTJU7zS9YthGjchJ2DUOYbh15uiscqHiMclLRPrHTvlq5Ij3KO3Jqf2doG0X5yus4IZqNj9/z6pWrcx2O84eIM8BareyfN+f3SGvtDAmVdj9NohuFkAETtWe/MNmV1vKNFjGADcaCHdb96IbiqyA5v3Dnv9CmwDGGVC1qhV1EL2jLcmCfKoQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=bX4PEtKUnAvyDJbJVhYTZH1nAiQ28jY/InB3c7NbKJs=;
b=UHAtiVNEEhKB2xbdK0kgN7jUX9wTcm20ufqBt1kQHxFK2GcGB6l1xMQcPZIh7NOgjSZnUI0h50/GVUGSN4fz5UmBuW1k4ZjI4jHax81M8x9Xh0MmhqP0WN/2cVoqXoDVdv9orCpM+XcZ6pRdVgOdG2YdyZE0rNNSKDrNmHS2NWeE92ousi2vyn2ySGzVAUM3c3tUlTclXyr8St5hpm7O4iA1MxmJaSTqefgiNp6QjvbEUVFeQgL+gNSkm0YGuiiIwZ1AdbYudBuxzR4YeUYKUkXzoxSBy7oja94cLZ0uzYDkNKCJP7Ej2sS0EN6mhYHAe0k4yCYRp78oo0bOuEUUcw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu;
dkim=pass header.d=cornell.edu; arc=none
Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled?
To: cygwin AT cygwin DOT com
References: <41A583E1-C8E7-42AB-9F24-EEC33A41EC60 AT house DOT org>
<20210825201845 DOT 07b6400b79dc5558a7761efe AT nifty DOT ne DOT jp>
Message-ID: <f8106fe7-a2b8-d106-3061-4d888124f4b0@cornell.edu>
Date: Wed, 25 Aug 2021 13:52:19 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <20210825201845.07b6400b79dc5558a7761efe@nifty.ne.jp>
X-ClientProxiedBy: CH0PR03CA0088.namprd03.prod.outlook.com
(2603:10b6:610:cc::33) To BN7PR04MB4388.namprd04.prod.outlook.com
(2603:10b6:406:f8::19)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 61b16ae4-60c7-41c4-9709-08d967f11690
X-MS-TrafficTypeDiagnostic: BN8PR04MB6356:
X-Microsoft-Antispam-PRVS: <BN8PR04MB635603076999A09A39E9B6DFD8C69 AT BN8PR04MB6356 DOT namprd04 DOT prod DOT outlook DOT com>
X-MS-Oob-TLC-OOBClassifiers: OLM:1775;
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: C7xfMRT5SWofY3QgDl3FGTvb8Y/ejwLXnMte4cI0tVrww9F26tbZr/pEFx20v4c4SgdtX5JNxh6NJq6irjRLpdH2pcbPaLd7kfjurCu717w/mIEsRYHtWHikeJvIfhCyksq0gxyodFuB6Lz09KIdaBy6Qd8Hkc5D+Bq0XAy4RQNDahyGSh0lVRK81in2b5kJwJVBDR+9x8lzHyOnjcfipW80ObwXkt48XGigYJY0ckoi58xMRsDVs0Dibu9eaQ3vVN2J5gZbt46Gbnq/lluboNUyxb6+jhH/k1kJ5gJFqx/i0QJnV/97yjq/+DIODgaZL9d+NO7CEOCOhLhteL4rfEmHAb/qI/kHQFQoXxPz/t7JF+GnqA7gVpLm1RsxoQEx7hSLo8i58FZXuFRicrFqwbkm7tTYyN2ZS3kiIACZVipS2aQ6an1Q8e0ajbKa9qPbKwuIW4F03uAb3hAgZsw05O8+yVD79eW5Jte2gpROo1e4b+y+PrN5/w3rQOKWH5hC5pMAuwurOoUUXRBmLxO6LOkWkfbOA2m6UHYjq8NU5wUrY2P/vSNCwGNUoUkFPZ+VRX3q0VArXjzx9bVjp9vYGdXMt4jK2GcRRvO7zMSshTzEa0csF6b+8Pfis5oDVtZem3mNtoi5TehTLeEw2VOE1vVlX9jwsCqlt6bKtcRbLPMLBAWGjXZykg9BiC9xrt+6WiQyEqjjf/kx5UtjqOymbMiu/8J8PREkaMZD4zKEGltAkzS5hN2EGK7E4n3UmWsWdueh1Q+Qlm0tSjMQp2BOLLyO67j8V4ynY/XIek4Iq3QAKeYYIaM/GnfFTK3Uw0blHHGqrYHkEbcw6BupfLGgOA==
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:BN7PR04MB4388.namprd04.prod.outlook.com; PTR:; CAT:NONE;
SFS:(4636009)(39860400002)(396003)(376002)(366004)(346002)(136003)(38100700002)(86362001)(6486002)(83380400001)(75432002)(36756003)(786003)(31696002)(316002)(31686004)(966005)(2616005)(8676002)(8936002)(186003)(5660300002)(53546011)(66476007)(66946007)(478600001)(66556008)(6916009)(2906002)(45980500001)(43740500002)(460985005);
DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?Windows-1252?Q?5s5t2I6c+BkF79NpWtOa6ZLlRX0v65Hu/yPz+rG5mN15GYW1IFcTC2Rs?=
=?Windows-1252?Q?DJ9bmhD6BtBN/cphA3KQmg9uq1p8aNBpNAiLD5cgKGQVuDCTsmmh3VGp?=
=?Windows-1252?Q?7v+ZDFTsuEz3vKKAiUZHPNWLxBptLM/cT7Lvw8sRUh9rcpsEshyGuLzq?=
=?Windows-1252?Q?v235EH0nu5jjGssMsW0BPnzsYVSwqllEIBTqBAq2BgWpzShEBwe+6dTU?=
=?Windows-1252?Q?+1UCr7twjExySZmCEx6D25roP4iG9yW9BfCqCg6qxfToka9NXL2kY8xW?=
=?Windows-1252?Q?GQXak3J2TcYAVH0UzJj6Hp6hktJhZuvGN64vqMNqC0TAsxxOkRL6P4on?=
=?Windows-1252?Q?Qc/kydUZP6RSx7Z48kuX9jHJ7c3sSBdsY02TjSx8r+hhSJw3Fk9YHOUf?=
=?Windows-1252?Q?ElCEbYrpFKwOUykF1GF9YHe29VLtDVw1mYnumcKxUw7YbgicKteFymOb?=
=?Windows-1252?Q?1Ttb0KEAFXb0wC1qD+gK39jNrTtb8pr/MHbHhAYRAs88w4/Qh9ujt7ym?=
=?Windows-1252?Q?/5meOj00zMhQ/9IQxL1TE1kNUmqdhPymg2HKiPBYCKkHTHKyH6WxpqUu?=
=?Windows-1252?Q?cSf/wTG5zyk65Yg3EZ8NneXrXuB2k3y7aEue7um675jQc526+1yr4HxT?=
=?Windows-1252?Q?MceKPzycKq8E82kotlF64W929yVHq0yZ79QU5Um52la50C5oLx2MobHd?=
=?Windows-1252?Q?ls+QbptVRWQey7F4sSLpZnfinoh47FO1VLLZp5ni3hBlFOfW/2hZULZe?=
=?Windows-1252?Q?svchHZJB4J1MmAzhxIbBOlyHOzdw+U3W+6SQ378dQLAcrmVbwfK17EhT?=
=?Windows-1252?Q?9/3WR8UhfAH7kM6/p3FBQmLAxlgFecvBw3xnIrwVtDYRTrJmtOtDD1mB?=
=?Windows-1252?Q?Q/J1/npqYEXqW8TrYhQ09LNszqcvoPy2nywoZaBDd9HIvAy03i/mwg+v?=
=?Windows-1252?Q?adA7IuY6XsQTyFx/Yd/s0aUfK5zumEr5gU6jI8HsafOLWRXfYXy/Qfnf?=
=?Windows-1252?Q?ltHJc/SqGX8ZMoq0lTw0lQuwmZANYVfwhwLsbalnFgkyZnpWcbm6+ElO?=
=?Windows-1252?Q?gJM6fnLNR4AiL1NxA+KRKErDXXSeEJwLxR55cLMiTloqxXApQ86Rog7I?=
=?Windows-1252?Q?coCglgQEMxz75sqApIYbvvwn0neAarx69k1Mzj3qEmVUI/utgSW1eS3b?=
=?Windows-1252?Q?kn5BysJvS2vWe7z87VL2t4BR0BP/n3B9BDS/XytiQT+dFYOsPlPDdFjn?=
=?Windows-1252?Q?7eluWoJrEh5C/9qCGCVynkJM1YaWa4eW03xjgyQfvmZA22ykWBFNxfvn?=
=?Windows-1252?Q?IU0gCI9byf7b+2orlzdl0e25mlv5+9B0zFepgBs8M2jhCW5Y3Jx6KlKG?=
=?Windows-1252?Q?FXMeqSLmPrTyBZtE70083ScZYPEdaTGpcSEGoumpUCZs05NkxS9c8BvK?=
=?Windows-1252?Q?o/qvkKTfXv9ATV9bYwgYEVPf5T1f1wC1qzqfiKpktfL5KGuNZ4FnKSFj?=
=?Windows-1252?Q?GbTp4pjY?=
X-OriginatorOrg: cornell.edu
X-MS-Exchange-CrossTenant-Network-Message-Id: 61b16ae4-60c7-41c4-9709-08d967f11690
X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2021 17:52:21.4838 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: ZAlJrxCxZgq4rFTRvEhHM08Z8d7iazqsX0M+TznCbKubDq1ds9HxZIsSWMVKQ5EvRdqum8QgsGwqYZLNLEEf6w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR04MB6356
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL,
MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,
SPF_HELO_PASS, 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
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Ken Brown via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Ken Brown <kbrown AT cornell DOT edu>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 8/25/2021 7:18 AM, Takashi Yano via Cygwin wrote:
> On Tue, 24 Aug 2021 12:49:52 -0700
> 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.
> 
> In cygwin, just scp is very slow.
> 
> The transfer speed in my environment is as follows.
> The tests were done with 100MB of test.dat file.
> 
> (1-1) From cygwin-PC,
> [yano AT cygwin-PC ~]$ scp test.dat yano AT linux-server:.
> yano AT linux-server's password:
> test.dat                                      100%  100MB   4.0MB/s   00:24
> [yano AT cygwin-PC ~]$ scp yano AT linux-server:test.dat .
> yano AT linux-server's password:
> test.dat                                      100%  100MB   8.0MB/s   00:12
> 
> (1-2) From linux-server,
> yano AT linux-server:~$ scp yano AT cygwin-PC:test.dat .
> yano AT cygwin-PC's password:
> test.dat                                      100%  100MB   4.0MB/s   00:24
> yano AT linux-server:~$ scp test.dat yano AT cygwin-PC:.
> yano AT cygwin-PC's password:
> test.dat                                      100%  100MB   4.1MB/s   00:24
> 
> 
> I looked into this problem, and noticed that this is caused
> by cygwin pipe implementation. Pipe in cygwin is configured
> with FILE_FLAG_OVERLAPPED.
> 
> If the pipe is configured without FILE_FLAG_OVERLAPPED,
> the transfer speed is much improved as follows.
> 
> 
> (2-1) From cygwin-PC,
> [yano AT cygwin-PC ~]$ scp test.dat yano AT linux-server:.
> yano AT linux-server's password:
> test.dat                                      100%  100MB  85.5MB/s   00:01
> [yano AT cygwin-PC ~]$ scp yano AT linux-server:test.dat .
> yano AT linux-server's password:
> test.dat                                      100%  100MB  69.7MB/s   00:01
> 
> (2-2) From linux-server,
> yano AT linux-server:~$ scp yano AT cygwin-PC:test.dat .
> yano AT cygwin-PC's password:
> test.dat                                      100%  100MB  80.1MB/s   00:01
> yano AT linux-server:~$ scp test.dat yano AT cygwin-PC:.
> yano AT cygwin-PC's password:
> test.dat                                      100%  100MB  57.7MB/s   00:01
> 
> I am not sure why this happens and how to fix this.

A couple years ago I had an idea for changing the pipe implementation to avoid 
overlapped I/O:

   https://cygwin.com/pipermail/cygwin-patches/2019q2/009393.html
   https://cygwin.com/pipermail/cygwin-patches/2019q2/009423.html

I never followed up on it.  But if you think it might help with this problem, I 
could dust it off and try to finish it.

Ken

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019