Subject: Re: [PATCH] Send internal packet priority

Re: [PATCH] Send internal packet priority

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Tue, 6 Sep 2011 12:45:26 +0100

On 6 September 2011 02:56, liuzl <xieepp_at_gmail.com> wrote:
> When sending a internal packet(eg:window adjust packet),
> even we may blocked in the last call, try to send it normally
>
> Signed-off-by: liuzl <xieepp_at_gmail.com>
> ---
>  src/channel.c   |   37 +++++++------------------------------
>  src/transport.c |   12 +++++++++++-
>  2 files changed, 18 insertions(+), 31 deletions(-)

Thanks for the patch.

It works in as much as libssh2_sftp_read with a 6MB buffer no longer
blocks on the first attempt. The first read is very quickly
successful. However, subsequent reads are very slow. They cause 100%
CPU usage and the teeny script, based on the standard example code
with a 6MB buffer, uses 50-75 MB of memory.

From watching the network meter, it seems that the 6MBs of data is
transferred in a fraction of a second but that libssh2 spends the rest
of the time reassembling it before returning from libssh2_sftp_read.

Alex

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