Subject: Re: [PATCH] Send internal packet priority

Re: [PATCH] Send internal packet priority

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Sat, 10 Sep 2011 21:11:08 +0100

On 6 September 2011 21:36, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Tue, 6 Sep 2011, Alexander Lamaison wrote:
>
>> It works in as much as libssh2_sftp_read with a 6MB buffer no longer
>> blocks on the first attempt.
>
> Out of curiosity, why do you have such a large buffer to begin with? I've
> not seen any benefit with more than 1MB even when speaking over high latency
> high bandwidth links.

Because its not my buffer. I'm wrapping libssh2_sftp_read/write with
an IStream interface so that Windows Explorer can access the data in a
remote file. When it calls IStream::Read is does so with a a
326,365,104 byte (311MB) buffer regardless of the size of the file.
I'm guessing that is a memory mapped file rather than real allocated
memory but I have no evidence for this.

Anyway, I was just passing this buffer on through to libssh2.

> And related, do you still get problems if you (as a temporary work-around)
> use a smaller buffer?

That would work. It's what I used to do when libssh2 had severe
problems that limited buffer size to something like 32k.

Alex
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-09-10