From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2123.outbound.protection.outlook.com [40.107.243.123]) by sourceware.org (Postfix) with ESMTPS id 097883858417 for ; Mon, 30 Aug 2021 13:51:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 097883858417 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cornell.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cornell.edu ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OF/z+jBO2fzt+BoQUT8OdtC6tvv0zUcLQSzFSOmUndH5HTzUhRok4DCMgLC9RmajCKb5TtQIv4U35bjmsNeGDh70YsQQS7s+4L0T3DTzQ1HnKJDj30KHbV9U7RRqUQmZwOxCLXeolwgq71RkRP39/LQgsEvGARMpKVNtpsSJNeMewGnFCSBfsquEn42GtHlPpoDBlZsnaC096SNRHVj971+fGXrrU1V3Q6NrQbKoX7NW/9saRnKAFocxluOuGN594tbEpVUGClWs/cznhFzIQCcny/9ENeowlrBokPPBsy1aQ/nUafRPY7HLEDmCEvZMJ9+WnZGAAt0PAecwWZ/MGA== 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=hHbaswGUx5Jwqk1JfPXzRZiDLAV1aI/l3Dx3icaZLwU=; b=Y1IGyu3SFtAuAWXI74U0ZUqezIRNhMPUDyoLm2o0Ctusa14WDqq9JNpxnMZSmiQuQbJbDbJ6Wuyl8vYC2d0UFYrou8BLojADXYKoOI/BO7cAxLhjBrrJsyJ9W7GAiRTiXc2Y64W/OzGftCl1M9Uy0vjETSCL2IrMYx50VaWSNed/a1y6HMaNwZCv+6kG51sPfnKZ7AHjRm9NZ9RrXpB6wu+0LXkSjpHK/kmdvUw2o3vp6am8nhKis91HmEEcH6zm4QeHv2wtWPWBW/ncWMJPtqIEb/cep286+NWTTlw/hgacPz+R+9AaP7jJQ4dU/XIWVbqSF8NK6/cD3QH5UK7AKA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hHbaswGUx5Jwqk1JfPXzRZiDLAV1aI/l3Dx3icaZLwU=; b=NxTQZXPSxLfBXY5PQljSrTWBgDRB0ubuDveVVniKpa/d/INjOUqrC5nS7rPR5oZnuL4GOwK+eewtoncGIlz5kfBTfJao2docewOaSD1Z3UUbtwZISzYZTSc8l2XRbEreKv+cmgXmLiXY0mtqt/MjkbMgZCkmnfT/r1vYAHT7XgQ= Authentication-Results: cygwin.com; dkim=none (message not signed) header.d=none;cygwin.com; dmarc=none action=none header.from=cornell.edu; Received: from BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) by BN8PR04MB6387.namprd04.prod.outlook.com (2603:10b6:408:d7::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Mon, 30 Aug 2021 13:51:34 +0000 Received: from BN7PR04MB4388.namprd04.prod.outlook.com ([fe80::38bd:b608:234f:9ec6]) by BN7PR04MB4388.namprd04.prod.outlook.com ([fe80::38bd:b608:234f:9ec6%7]) with mapi id 15.20.4457.024; Mon, 30 Aug 2021 13:51:34 +0000 Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? To: cygwin-developers@cygwin.com References: <20210828184102.f2206a8a9e5fe5cf24bf5e45@nifty.ne.jp> <20210829180729.48b4e877f773cb3980c5766d@nifty.ne.jp> <20210830091314.f9a2cb71794d0f68cdb5eba7@nifty.ne.jp> <20210830092259.52f7d54fc3fa340738373af4@nifty.ne.jp> <20210830170204.fa91eaf110f310f13b67abc3@nifty.ne.jp> <20210830210423.00df7f37473b0ac1251e880f@nifty.ne.jp> From: Ken Brown Message-ID: <932300c9-2e09-5ee5-bbb1-3c060d33e3e1@cornell.edu> Date: Mon, 30 Aug 2021 09:51:33 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH2PR17CA0027.namprd17.prod.outlook.com (2603:10b6:610:53::37) 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 CH2PR17CA0027.namprd17.prod.outlook.com (2603:10b6:610:53::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.21 via Frontend Transport; Mon, 30 Aug 2021 13:51:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7f349344-1fbf-4323-0ce7-08d96bbd4789 X-MS-TrafficTypeDiagnostic: BN8PR04MB6387: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e+OcViUNm/Ef7HHu0ebEQ48JmY4yC6zjOG2SIVOKufxfAI+wyMyp5rHh9qDrqYfVnd9jiNaUSSMOhv+JFkBLtPQO+tPdjgcUIFy23TSodKVBJjRYK026vqbYeR8kKz7qoffLJI8o1vpwSwkRxZ0Q8nVDzP4VqaCqcxksl6aU4/vDfIZ8pF1MW6voMOoEMCBgAMkZae9JElhvIJUekXE2f/sHLu/+IX7pKLTJMRTZoUsqhmdKdD7Gt6vO9XVDgWe2ZHdIeGRbi686ij0BUgPGxDHc+HR2SJcxsh0jZ7bcliCykFBBaJGsrov7Ue4XWQaZPPWEPb7fLfnOKWzJvHYorog+NJQCvKGfdhzzhcYxuibkFXPPXvWLuoPT4ZECjNSy348QrLUTCXrEeXJMi7iCQDZ2oSkyQ0xZJqeZhhdoDr469dhiA478mK2aiE6g5xrAJjXxX4gXcnL1mYXdBjpkaiR0EX7RRO3/UjETX4hnfpWonGZFbYDwFSmg+16FWIXxgck+DQyEmu4Xq6omzcEon+fqnMtIDcnbLZI9CgfyJecn+x8ARUZBpPq3Br7yzKjnUzxYoMRrteJ73dwY92ERlQAZG2rQ3YeFkfcUoM5uTCCe+uK8cMUxdMXrXnSbUZSVRYVtU3xQZXN3THn3ih0GsQW8cWt/Xn2qeI/71T8p6uPTHDeaRyecmzNXmbp345DQb8BBbJou0/Ykcd5PYzbYdhENkQDqpGqx6OK1iV+NgIxi7Rxwq10QKaij7Kug7HHTeY285t9otnR4DSpY0k2kqwAnUsY0xkIDwep+Su9wOoBye3neKrg63y9VfMSyZF2j 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)(376002)(136003)(39860400002)(366004)(396003)(346002)(6486002)(8676002)(966005)(8936002)(2906002)(38100700002)(66476007)(5660300002)(31686004)(31696002)(36756003)(478600001)(2616005)(75432002)(66556008)(186003)(26005)(786003)(53546011)(16576012)(956004)(83380400001)(86362001)(6916009)(66946007)(316002)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?Windows-1252?Q?cZaCUTUvcWE9p6Lbwb+pTYGFqRjD1QVtHquf1CU7Gz9IuUm8PGCTLT1E?= =?Windows-1252?Q?wAaETwrzHB1fADTzRcw4uG92x3Ud5DFtWncckSAVvrTiy7R2dozOS17o?= =?Windows-1252?Q?OJ9tdLGiw38+z7lQZgplje+4g4BRfwYORrQNNwk4/UrOm9Q3ZYz6GYsg?= =?Windows-1252?Q?UubyTIzT91Pl4Sl/uVJHmR9fSmxkVeMBUPhCBw41O9sHwpXdfAlTUlcN?= =?Windows-1252?Q?PJRPioNIq4s3+AU2QABqj8xPbpLRxF36QR3AdaHTZxyAroKch1lnoM+C?= =?Windows-1252?Q?0V9lAm2YxdYKY0D2vr9gf9cIdzc2Nm8TJ5CusgXWbd2yqgZvAGoT6TF/?= =?Windows-1252?Q?r5l/KeJNj7XsfZx1lYgEDdB+VjhMIsFGoBSTU2cZBO9i3buWiseIlziQ?= =?Windows-1252?Q?pf7ndHa96nUOJh/W/FmPCbPb/SMUj01Unda96O/n9X9wTmH4/NFcYyGg?= =?Windows-1252?Q?B/HSLynXHOjUzsmoi5KxxV0CnewIF2x3kXu7mHBChAJ7BEJAFLg+QXL4?= =?Windows-1252?Q?osh9D11Y/dZSjTsBirMd8z3mGv8RuDIHi10Y2vMWvy4N7HdjQaTSQVrZ?= =?Windows-1252?Q?k+XxKJPoV0ikkbUlbg/1AOMPPp6l8SSVcUmbVYGq/qNaI3AupPHtoJ0B?= =?Windows-1252?Q?LrIvGLYopNUM8QK2ojwpMfGUlLizNidHTKcolBw5h7CzuSUcvb8hZc0f?= =?Windows-1252?Q?nTST8tLmBmtET/vG/0yeeaUrzglrIHt1Dp3CaDIZKQE48CzRaeQBH+pS?= =?Windows-1252?Q?TZbajssDkoy3CJNH8axq/fH4HpygkVCoiV5HO5ci2k7jEqpfCu/D2iKu?= =?Windows-1252?Q?Hr05F2P7CItlrIZBse2uuEgETAlG2OwKmD6L/9ge/xE9pkUfHrJF1TEl?= =?Windows-1252?Q?oQGEnR9UHX43djvzVO2t335FuZeO/FhfbqKGrQOrEB6OK91kZovzufB/?= =?Windows-1252?Q?2cKeWwc5OFoprbAOj1hO4+Iy748BfNETT07TZhd9lg14Z+fYpiW1VotO?= =?Windows-1252?Q?Rbcf3NMR9ij6FC6rwIJoeWBj4/ox41tIiZqYqz0Tmv7H3B5581T5fytf?= =?Windows-1252?Q?hl1aX2NnpppBmkfnrM+KtLUe6I/h7BDWg/7W+lpF9F0te0b8jkye9Fjt?= =?Windows-1252?Q?M0NXK+SJ/vN/6DAMx2Q/PrTOPG72fZva7eUZVo80mWDTr3a0Cvlqny3i?= =?Windows-1252?Q?NtgicVKSQBpq3TdVsBq3+57NrG0Ep2LubTQjCstSNAiEkwNRtR0RqnWF?= =?Windows-1252?Q?5gRTS6X+ZA+qDy26GORVNQGFEogIrPJd1JKYvszKeTIX42IEkQFSmISq?= =?Windows-1252?Q?hSXMPsYvkPbRolU3HkIlLVA1eQW+cAlg4HqaYdkyKMT2/Ql3bCJAjHUq?= =?Windows-1252?Q?KH4skYtSjulXlBLnqKtIWR41knuu5YcH15LORSRMHuyGtSdxzRP3D+A/?= X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 7f349344-1fbf-4323-0ce7-08d96bbd4789 X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2021 13:51:34.3980 (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: Nm2dp6LEHBZxPISlPGqENZ/UdpNsgc0Xue1qqNrbAmtnbnRpzIKpXLkBxLDxbwVq6Qsm7maKYFSh0tTF7Fr5KA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR04MB6387 X-Spam-Status: No, score=-3.8 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-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 13:51:46 -0000 On 8/30/2021 8:55 AM, Corinna Vinschen wrote: > On Aug 30 21:04, Takashi Yano wrote: >> On Mon, 30 Aug 2021 12:20:30 +0200 >> Corinna Vinschen wrote: >>> [Move discussion to cygwin-developers] >>> >>> On Aug 30 17:02, Takashi Yano via Cygwin wrote: >>>> [...] >>>> Is naming the pipe really necessary? >>> >>> It's not, but CreatePipe is doing this anyway. >>> >>> "Anonymous pipes are implemented using a named pipe with a unique name." >>> https://docs.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createpipe >>> >>> The reason CreateNamedPipe was used in the first place was that >>> FILE_READ_ATTRIBUTES isn't set by CreatePipe for the write side >>> of the pipe, however, it creates full duplex pipe: >>> >>> https://cygwin.com/pipermail/cygwin-patches/2004q3/004912.html >>> >>> Given the fact that CreatePipe is implemented in terms of >>> NtCreateNamedPipeFile anyway, why should the pipe created with >>> NtCreateNamedPipeFile fail where the pipe created with CreatePipe works? >>> >>> The only reason can be some missing flag, I think. Checking >>> fhandler_pipe.cc::nt_create and comparing that with the default flags >>> for files and other devices, it occurs to me that the SYNCHRONIZE stuff >>> is missing. So, Takashi, what if you call NtCreateNamedPipeFile like >>> this in nt_create: >>> >>> status = NtCreateNamedPipeFile (r, access | SYNCHRONIZE, &attr, &io, >>> FILE_SHARE_READ | FILE_SHARE_WRITE, >>> FILE_CREATE, FILE_SYNCHRONOUS_IO_NONALERT, >>> pipe_type, FILE_PIPE_BYTE_STREAM_MODE, >>> 0, 1, psize, psize, &timeout); >>> >>> Does that fix the above problems, too? >> >> Yes it does! Now, if CYGWIN=pipe_byte is also set, the piping issue >> of C# program is gone! >> >> In fact, I've already tested adding the SYNCHRONIZE access flag, >> but it didn't solve the problem. It seems that the cause was >> that FILE_SYNCHRONOUS_IO_NONALERT was missing. >> >> Thank you for figuring out the solution! > > No worries. The same should apply to the NtCreateFile side of the > pipe, btw. I'll add my thanks. I should have checked the default flags that are typically used for other devices when I wrote nt_create. I'm glad you caught this. So I'll reinstate the use of nt_create and then let Takashi recheck everything. Ken