Subject: Re: Openssh vs ssh2

Re: Openssh vs ssh2

From: Daniel Stenberg <>
Date: Tue, 19 Oct 2010 14:59:39 +0200 (CEST)

On Tue, 19 Oct 2010, may nothing wrote:

> Question: Why is the libssh2 sftp so much slower (or is it an issue of my
> code) that the openssh one ?

There are several problems, and I would assume the two primary reasons are:

  1 - the lack of "pipelining", so that it only sends a package at a time and
      then awaits the ACK for it before next packet is sent.

  2 - the multiple malloc+copy + malloc+copy series that libssh2 does, as I've
      mentioned before

> What can be done to increase the transfer speed ?

Fixing these two issues. I've previously posted about what I think needs to be
done to fix #2. #1 might need a slightly modified API to work really nice, but
I haven't really finished my thoughts on that yet.

Received on 2010-10-19