X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2AAF23857C7E
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1630080137;
	bh=8agohTfRjBK0PjuS6esFb1ZClzXXK/XbJUw0ohxz93c=;
	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=DzIKtPRM3icYJPlpCg3cXgy58jbM/hLHo/6NOic98JbssMorTico4pPxvSwwTreV7
	 /l5p9ovNvsQoB7XWh5VLUMUJZqUAvbCj1yJzbIUi6GVdbfsWqOuHqgUspNiPOIUsYH
	 WYfN5vslZ5PxXlAejqxhXU5L4rwD20VhWvCuXRus=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 48ECC385841C
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=c+zCeRtEvARFZlqRYCo5pJtnBLAc08qJjLMfdUCmqWkwIlY5TQKEasbMm59td3ZIIZ7KNexeNAjwOi3TkiYmsrMoch/E++n8mhLXYayXK2+OMCw6eugYg/P5BaAogt6fM2i7QTi9R/Qeld0e+9ehrAFEW+Jfj+MFePv+4u9SsT7ioVazaZzwVzrixENf7zJoqIDW8kq9wAYYJN6W28pyX2e41Z52lnNJh3f182c2tXFJtOMza60Oyv8nTzK+DwLBNTp1MoKb/j62xDqjPVho1AeVQA7pWCoizw6czxDlT/4XkzAPZKhTDUPNUqo94uxw8PDLZgiqd2wZTTzPMhFiIg==
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=eF+4mi8BIIIiElyR5KYwrZABwMCQqwTKjKhrONLSBoA=;
 b=AmnliRP+lPTmpna3nfSpcAGPCN6Sx+Tw/jrRRGjTQXfZXcZpLhKsVV0m4Cb1bFNwetxcJklXwJ1UJSdPxFXBLIB5cSa5aU0wrswmq9clGxckNeFe2hxbrWxUQN6lCrxP5pl9XvbvCG4hhx7PARUJaYXHfBH9eqlj3pjWRU7yj6gX3tWxmuef/vkaxnn+FOPDlvYtYnvYXWAq+5KL/JD8BrYfZXuje3ykfp/yc2yBwQBypn+eBjDh3LXLTyDssoqulAPZht4J4LZ9ZrVskisUB6/CLfRpsZLrelFtWpAG8KSus8QfPcCGwECUfnpvKXsYi4bx5Lm5DQFSU/6JDIxyRg==
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: Takashi Yano <takashi.yano@nifty.ne.jp>, cygwin@cygwin.com
References: <41A583E1-C8E7-42AB-9F24-EEC33A41EC60@house.org>
 <20210825201845.07b6400b79dc5558a7761efe@nifty.ne.jp>
 <f8106fe7-a2b8-d106-3061-4d888124f4b0@cornell.edu>
 <20210826062934.54f2f2216021c095bb7ba13b@nifty.ne.jp>
 <d0a8c57d-1ed1-6b4f-c6e7-cbe0e2ec8a1c@cornell.edu>
 <3b560051-ab27-f392-ca4b-d1fd9b5733b0@cornell.edu>
 <20210827202440.47706fc2fc07c5e9a1bc0047@nifty.ne.jp>
Message-ID: <4f2cb5f3-ce9c-c617-f65f-841a5eca096e@cornell.edu>
Date: Fri, 27 Aug 2021 12:00:50 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
In-Reply-To: <20210827202440.47706fc2fc07c5e9a1bc0047@nifty.ne.jp>
Content-Language: en-US
X-ClientProxiedBy: CH0PR03CA0037.namprd03.prod.outlook.com
 (2603:10b6:610:b3::12) To BN7PR04MB4388.namprd04.prod.outlook.com
 (2603:10b6:406:f8::19)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from [192.168.1.211] (74.69.128.111) by
 CH0PR03CA0037.namprd03.prod.outlook.com (2603:10b6:610:b3::12) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4457.21 via Frontend Transport; Fri, 27 Aug 2021 16:00:51 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 3b9055ac-6432-40ab-b4e0-08d96973d7ec
X-MS-TrafficTypeDiagnostic: BN8PR04MB5617:
X-Microsoft-Antispam-PRVS: <BN8PR04MB5617B023970978D31C7EAC4FD8C89@BN8PR04MB5617.namprd04.prod.outlook.com>
X-MS-Oob-TLC-OOBClassifiers: OLM:337;
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: MBNqSE2DwuO3tJDTpkCX8nWGNPTUhsNFE/Ut55UYnn9ZXmulLHjXziTDxpZI4Doxf5r+4KwkQ+LSIJUYf6IT7lykual+fhHVzcolreUCesaRnG7vuIJc5/y4nB0Pr0GrbfqV5YvCxP69e7AeJBZe++9e3YwIvPA+G6AiuN0XoByjOd3yAQZ26LaoZKVd+oNv7wavJ7OGFiv7gEB2GqI73fzSZRIkkgBmOlv54VXfR5GJ5My9+fi21ozFJ2IygvyQcNZw2V5OEZIPTYwj6T80STZusDBFozvZ1ree4hQxbxFtEW6Kes24//sD8k8xNq4UcT4fQt2AFoOm39mi7qTGH94sLj77U0P/mPs4QsEPesQqBhuAyXClTmIZ+g8dUX+dNh2qoyQV9dSJvov1pvo2qxGgqadN7uDswP1xCmDZnBZpT/v9le885NNdRnixIRiCP3h3+0mkukgJOzBJmAOsw26Pabn3Se8nE+WvniTgNi5P2aR4Z94EsULkIrms27JNDrHFQhhUYPAABnsInOjuOlNbIh/wTFhQVoCuuZyLyiwPM2gC4pcuteSKb/GajSZy4rwxL2f4PU0PZdaxK+2+8ZdbEOpdscDBYXMGuvzsQjlvR91bp62grtd8feSF3ZrMuWA1uzDmuuWBfEqUGmQXTnyvT2UUaLukfd/vq85QiF5+0Ca5AsWx3u1D112DWnSAJ1ev/es9ZxGHK3U3yDypwEmqCGXrKV01yqTQOa5H3AcpiRoK7FgyD2/qYkzFeJrKcfyeoB4ePQCtgE1vS5694eRrYBr3Ahh7gXCrnvj3rPNTztHwkrTOhKpG4mrzqDQf
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)(366004)(136003)(346002)(396003)(376002)(36756003)(83380400001)(31696002)(186003)(26005)(956004)(2616005)(478600001)(53546011)(6486002)(786003)(966005)(2906002)(75432002)(38100700002)(86362001)(316002)(8676002)(66476007)(66556008)(16576012)(66946007)(5660300002)(8936002)(31686004)(43740500002)(45980500001);
 DIR:OUT; SFP:1102; 
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: vQEqD6WIZgEbi8LNHJeelZXWxSJgYEVNsjHqkW8xbV/d2gQa3gNBFwvSOv/iSe2NferJ7jNTUaf9TWj0aOW8CJ6c6KTfLfbCrR43MMWtMHFlsINSmR9lf4eTKz2Sqlmelq12j8/MgpdA0EqvzwVWBuzWiAWpAbBpc2AlVEsdPwDhd+hhuxSaTJ83pNyz9bAjrFwS3t8ByPsEAbgoqZdYRCEhapgqLt1tv/TvuJnFnAQ2duVRzlFT7klUT4kuv+dEVGjrFVaVfXKB+GHVnpSeoY/yMpzqPtl5AAnH17KwTPmrJ9hokg0r9mmuJ0HIftL05AzWdDEdTn+QseJKlbp3kKAqhUX+wYX89Hm+/+/T9K4AuQCxsXs/Doh7cw2ypITT1a3EHVzmGaVwOiVbfOoMw7AVcSHsepYZxIobqSYP20mzpo/NUG1fOKAJm9ARmUYIrQdiS73yLLXsvs5wzyUyO2aJFpQbs/BQvPXmaLC+I3hsaJghneE2Y2noG8RJyjFL3AO+TJtAuf/jpD8uYs6DdpScK2DY4fsqnqwYYo1CDPCdl8mU7W/KfNFAh6jPkloiZeIAv6N5wpk+t0a7wa+5tBnvzHfXu/ZzLKbOr0qp534xfQNB2gJrXcRBMKL+hCosQRfQaKRWc0BXuPTjYDrsC4dE42GuG79fX8BlxQIFgoex9NPAAE6rbKd67lcldU+qCdVvbyiHh8PCalRac6Y75dat1rwGAFrXeeD8WsteLWgTDsz83tgTfbH6FYuc5WYc
X-OriginatorOrg: cornell.edu
X-MS-Exchange-CrossTenant-Network-Message-Id: 3b9055ac-6432-40ab-b4e0-08d96973d7ec
X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2021 16:00:51.5704 (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: IIfvk1xtfVygFGv7UVPduqDMw1plVhAyHW9jplvjSB3MuVEtGE84aj9YmnY8k2p8VIYSEcuBi6HIk7Of/O7DeA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR04MB5617
X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Ken Brown via Cygwin <cygwin@cygwin.com>
Reply-To: Ken Brown <kbrown@cornell.edu>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

On 8/27/2021 7:24 AM, Takashi Yano wrote:
> On Thu, 26 Aug 2021 18:18:29 -0400
> Ken Brown wrote:
>> On 8/26/2021 11:56 AM, Ken Brown via Cygwin wrote:
[...]
>> In case you want to try out my proposed change, I've just rebased the patches to
>> the current master and pushed them to a new topic/pipe branch.
> 
> Hi Ken,
> 
> Thanks much! I tested topic/pipe branch.
> 
> [yano@cygwin-PC ~]$ scp test.dat yano@linux-server:.
> yano@linux-server's password:
> test.dat                                      100%  100MB  95.9MB/s   00:01
> [yano@cygwin-PC ~]$ scp yano@linux-server:test.dat .
> yano@linux-server's password:
> test.dat                                      100%  100MB   8.0MB/s   00:12
> 
> yano@linux-server:~$ scp yano@cygwin-PC:test.dat .
> yano@cygwin-PC's password:
> test.dat                                      100%  100MB 109.7MB/s   00:00
> yano@linux-server:~$ scp test.dat yano@cygwin-PC:.
> yano@cygwin-PC's password:
> test.dat                                      100%  100MB  31.4MB/s   00:03
> 
> As shown above, outgoing transfer-rate has been improved upto near
> theoretical limit. However, incoming transfer-rate is not improved
> much.
> 
> I digged further and found the first patch attached solves the issue
> as follows.
> 
> [yano@cygwin-PC ~]$ scp yano@linux-server:test.dat .
> yano@linux-server's password:
> test.dat                                      100%  100MB 112.8MB/s   00:00
> 
> yano@linux-server2:~$ scp test.dat yano@cygwin-PC:.
> yano@cygwin-PC's password:
> test.dat                                      100%  100MB 102.5MB/s   00:00

Great!

> I also tested the case:
>>>> https://cygwin.com/pipermail/cygwin/2021-March/247987.html
>>>> which seems to be the same issue with
>>>> https://stackoverflow.com/questions/10385424/good-alternatives-to-cygwin-cygwin-doesnt-support-natively-support-win32-app
> 
> Unfortunately, topic/pipe does not help.
> 
> I confirmed that applying the second patch attached, which reverts
> to create() rather than nt_create(), and setting CYGWIN=pipe_byte
> fixes the problem.
> 
> What do you think of this alternative implementation which does
> not use nt_create()?

Two years ago I thought I needed nt_create to avoid problems when calling 
set_pipe_non_blocking.  Are you saying that's not an issue?  Is 
set_pipe_non_blocking unnecessary?  Is that the point of your modification to 
raw_read?

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
