More pipe problems (was Re: [Fwd: 1.5.11-1: sftp performance problem])

Bob Byrnes byrnes@curl.com
Thu Sep 23 16:28:00 GMT 2004


On Sep 23,  2:31pm, Corinna Vinschen wrote:
-- Subject: Re: More pipe problems (was Re: [Fwd: 1.5.11-1: sftp performance 
>
> It seems that NtQueryInformationFile doesn't return useful values
> anymore under XP SP2.  I'm not quite sure though since it's the first
> time I'm looking into this issue.
> ...
> [select_pipe] ssh 756 peek_pipe: WriteQuotaAvailable = 1024
> [select_pipe] ssh 756 peek_pipe: OutboundQuota = 16117632
> ...
> Since WriteQuotaAvailable is < PIPE_BUF and OutboundQuota is ... way
> too big, gotone resp. s->write_ready never gets set.
> 
-- End of excerpt from Corinna Vinschen

I just tried some of my NtQueryInformationFile test programs on an
XP SP2 system, and they all seem to work correctly.

OutboundQuota is just the size of the pipe.  How do we know that the
cygwin ssh didn't really inherit a huge pipe from the win32-native
unison?

Also, OutboundQuota is only used in the cygwin select code to detect
and deal with tiny pipes ...

          /* If we somehow inherit a tiny pipe (size < PIPE_BUF), then consider
             the pipe writable only if it is completely empty, to minimize the
             probability that a subsequent write will block.  */
          else if (fpli.OutboundQuota < PIPE_BUF &&
                   fpli.WriteQuotaAvailable == fpli.OutboundQuota)

... so even if OutboundQuota were wrong, I don't see how a huge value
would cause incorrect behavior.

The real trouble here seems to be that WriteQuotaAvailable is so low,
which (if that is to be believed) indicates the pipe has almost filled.
This seems similar to the sftp problem, which I am still investigating;
I haven't made much progress during the past week because I've been
busy with other things at work, but I have learned a few new things
and I'll try to send another report as soon as I can construct a
coherent explanation.

--
Bob



More information about the Cygwin-patches mailing list