cygrunsrv + sshd + rsync = 20 times too slow -- throttled?

Takashi Yano takashi.yano@nifty.ne.jp
Wed Sep 1 02:39:11 GMT 2021


On Tue, 31 Aug 2021 17:20:25 +0200
Corinna Vinschen wrote:
> On Aug 31 20:05, Takashi Yano wrote:
> > On Tue, 31 Aug 2021 11:04:05 +0200
> > Corinna Vinschen wrote:
> > > On Aug 31 17:52, Takashi Yano wrote:
> > > > On Mon, 30 Aug 2021 17:19:44 +0200
> > > > Corinna Vinschen wrote:
> > > > > On Aug 30 11:00, Ken Brown wrote:
> > > > > > On 8/30/2021 9:51 AM, Ken Brown wrote:
> > > > > > > On 8/30/2021 8:55 AM, Corinna Vinschen wrote:
> > > > > > > > On Aug 30 21:04, Takashi Yano wrote:
> > > > > > > > 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.
> > > > > > 
> > > > > > I've done this now.  I'm still not sure I've got all the flags right.  For
> > > > > > unknown reasons, I've used FILE_SHARE_READ | FILE_SHARE_WRITE in the call to
> > > > > > NtCreateNamedPipeFile, and no sharing in the call to NtOpenFile.  Should I
> > > > > > also use FILE_SHARE_READ | FILE_SHARE in NtOpenFile?  Is sharing even
> > > > > > relevant in this context?
> > > > > 
> > > > > This is only relevant if you want to open the pipe from another context,
> > > > > calling CreateNamedPipe/CreateFile.  As long as the pipe is only
> > > > > duplicated, it shouldn't matter at all.
> > > > > 
> > > > > But, as I just wrote in my previous mail, the FILE_SYNCHRONOUS_IO_NONALERT
> > > > > flag is probably a good thing for C# apps, but not for Cygwin, because it
> > > > > enforces synchronous operation.  Sorry about that...
> > > > 
> > > > With FILE_SYNCHRONOUS_IO_NONALERT, what kind of problems are you
> > > > specifically concerned about cygwin pipe? 
> > > 
> > > We're using asynchronous IO to be able to call WFMO and thus to be able
> > > to handle signals and thread cancellation events.  Wit hsynchronous IO
> > > this is not possible.
> > 
> > Thanks. How can I regenerate above issue? Stopping by Ctrl-C or killing
> > the process by kill seems to work even with FILE_SYNCHRONOUS_IO_NONALERT.
> 
> It may depend on the thread you're running this in.  But really, just
> call a blocking (SYNCHRONIZE + FILE_SYNCHRONOUS_IO_NONALERT) ReadFile
> in the main thread of a Cygwin app, and you'll see that neither Ctrl-C
> nor kill signalling will get through.

I confirmed the issue with FILE_SYNCHRONOUS_IO_NONALERT.

Thanks.


-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin-developers mailing list