Subject: Re: [PATCH] Send internal packet priority

Re: [PATCH] Send internal packet priority

From: liuzl <>
Date: Wed, 7 Sep 2011 16:19:11 +0800

2011/9/7 Daniel Stenberg <>

> On Wed, 7 Sep 2011, liuzl wrote:
> I think most applications will use small buffers. Counted in kilobytes, and
> then the "times four" makes more sense. I think we should at least cap the
> read-ahead to a maximum amount. Probably set to the maximum window size we
> will set, which current I believe is 3932160 bytes (64K * 60). Possibly even
> smaller than so.
> I would also not mind if we provide a way for the application to control
> the read-ahead amount/behavior somewhat so that it can actually tweak it for
> its particular use case.
> Agree. When transfer big file, i split it into several blocks and
transfered in several sftp connections at the same time.
  Each connection will just download it's own block,the read-ahead behavior
will cross the blocks eachother and waste network traffic.

> 2,caller know the file size, and the incoming buffer size is not bigger
>> than the real file size.
> In Alexander's case he mentioned the reading of a file that grows over time
> (/dev/random style or just a log file growing rapidly). Limiting sftp
> reading to a size known before-hand would change our behaviour with such
> files.
   Yes, that is a special occasion unavoidable.

> --
> /
> ______________________________**_________________
> libssh2-devel**mailman/listinfo/libssh2-devel<>

Received on 2011-09-07