delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/08/27/13:22:47

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 936B53858C60
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1630084965;
bh=V4VPnZ8jVIKcHJzPoH0lk513bxSJJkyBk7WNfBO0ReE=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=bkUfmqGrtsH9aHA4LhwvLkM9DD115EEV/MjW/GbiggaaLrA25HTNuQ6MMKDE3tPHI
U/dnLroXKjX3/hAsI+8h096x0Ix+rVOaEyX+cLv9jkA0q2nTFfk7KR3pHglsAm5ida
Fvf2vC8fC0UOm+kJK9NHu6ECZ9UowkidJB+Oi6Js=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 294AB3858413
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 17RHL6GA013473
X-Nifty-SrcIP: [110.4.221.123]
Date: Sat, 28 Aug 2021 02:21:11 +0900
To: cygwin AT cygwin DOT com
Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled?
Message-Id: <20210828022111.91ef5b4ff24f6da9fadb489e@nifty.ne.jp>
In-Reply-To: <4f2cb5f3-ce9c-c617-f65f-841a5eca096e@cornell.edu>
References: <41A583E1-C8E7-42AB-9F24-EEC33A41EC60 AT house DOT org>
<20210825201845 DOT 07b6400b79dc5558a7761efe AT nifty DOT ne DOT jp>
<f8106fe7-a2b8-d106-3061-4d888124f4b0 AT cornell DOT edu>
<20210826062934 DOT 54f2f2216021c095bb7ba13b AT nifty DOT ne DOT jp>
<d0a8c57d-1ed1-6b4f-c6e7-cbe0e2ec8a1c AT cornell DOT edu>
<3b560051-ab27-f392-ca4b-d1fd9b5733b0 AT cornell DOT edu>
<20210827202440 DOT 47706fc2fc07c5e9a1bc0047 AT nifty DOT ne DOT jp>
<4f2cb5f3-ce9c-c617-f65f-841a5eca096e AT cornell DOT edu>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, 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
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: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
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 Fri, 27 Aug 2021 12:00:50 -0400
Ken Brown wrote:

> 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 AT cygwin-PC ~]$ scp test.dat yano AT linux-server:.
> > yano AT linux-server's password:
> > test.dat                                      100%  100MB  95.9MB/s   00:01
> > [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
> > 
> > yano AT linux-server:~$ scp yano AT cygwin-PC:test.dat .
> > yano AT cygwin-PC's password:
> > test.dat                                      100%  100MB 109.7MB/s   00:00
> > yano AT linux-server:~$ scp test.dat yano AT cygwin-PC:.
> > yano AT 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 AT cygwin-PC ~]$ scp yano AT linux-server:test.dat .
> > yano AT linux-server's password:
> > test.dat                                      100%  100MB 112.8MB/s   00:00
> > 
> > yano AT linux-server2:~$ scp test.dat yano AT cygwin-PC:.
> > yano AT 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?

Yes. Instead of making windows read function itself non-blocking,
it is possible to check if the pipe can be read before read using
PeekNamedPipe(). If the pipe cannot be read right now, EAGAIN is
returned.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

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