Slow uploading with sftp

Darren Tucker dtucker at zip.com.au
Wed Oct 27 21:09:27 EST 2004


Roman Medina-Heigl Hernandez wrote:
> I'm observing a nasty and strange behaviour with OpenSSH
> (SSH-2.0-OpenSSH_3.7.1p2) on Solaris 8 (Sparc). I searched the FAQ and
> list archive and I didn't find anything about it.
> 
> The problem is that uploading through sftp is tremendously slow (~
> 0.2KB/s) while downloading is ok (~ 200-300 KB/s), so I'm quite surprised.
> The machines I tested (client & server) are all in the same LAN segment,
> so we can safely assume that no router / traffic shapper is intercepting
> the SSH communication.

I've seen one other report of slow SSH on a LAN with Solaris hosts.  We 
never got to the bottom of it, but we found a workaround by disabling 
the Nagle algorithm (TCP_NODELAY) on the connection.

You can try this by editting the set_nodelay function in misc.c and add 
the line at the bottom:

/* disable nagle on socket */
void
set_nodelay(int fd)
{
         int opt;
         socklen_t optlen;

         return; /* add this line */

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.




More information about the openssh-unix-dev mailing list