cygrunsrv + sshd + rsync = 20 times too slow -- throttled?
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Aug 30 10:38:18 GMT 2021
On Aug 30 12:20, Corinna Vinschen wrote:
> [Move discussion to cygwin-developers]
>
> On Aug 30 17:02, Takashi Yano via Cygwin wrote:
> > On Sun, 29 Aug 2021 22:15:29 -0400
> > Ken Brown wrote:
> > > On 8/29/2021 8:22 PM, Takashi Yano via Cygwin wrote:
> > > > We have two easy options:
> > > > 1) Configure the pipe with PIPE_ACCESS_DUPLEX.
> > > > 2) Use nt_create() again and forget C# program issue.
> > >
> > > I vote for 2), but let's see what Corinna thinks.
> >
> > BTW. what's wrong if just:
> > [...]
> > if (!CreatePipe (r, w, sa_ptr, psize))
> > [...]
> > In my environment, I cannot find any defects.
> > - No performance degradation.
> > - set_pipe_non_blocking() works for both read and write pipes.
> > - NtQueryInformationFile() in select() works for both r/w pipes.
> > - Piping C# program works.
> >
> > Is naming the pipe really necessary?
>
> It's not, but CreatePipe is doing this anyway.
> [...]
> 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?
Btw., checking the calls with Procmon from sysinternals may give a clue,
too. It was pretty helpful in the past.
More information about the Cygwin-developers
mailing list