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

Ken Brown kbrown@cornell.edu
Mon Aug 30 15:43:30 GMT 2021


On 8/30/2021 11:19 AM, 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.

OK, then I think I should remove the sharing from NtCreateNamedPipeFile, since 
it could confuse someone reading the code.

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

No problem.  I'll remove that flag for now, and we may have to live with the C# 
problem unless someone can find a different fix for it.

Ken


More information about the Cygwin-developers mailing list