Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Dec 2001 15:13:19 -0500
From:      "Louis A. Mamakos" <louie@TransSys.COM>
To:        Tomas Svensson <tsn@gbdev.net>
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, Josef Karthauser <joe@tao.org.uk>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: SSH stalls (was: FreeBSD performing worse than Linux?) 
Message-ID:  <200112012013.fB1KDJE91870@whizzo.transsys.com>
In-Reply-To: Your message of "Sat, 01 Dec 2001 17:32:40 %2B0100." <20011201173240.A20807@simba.systemteknik.net> 
References:  <20011201173240.A20807@simba.systemteknik.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I am not using compression and netstat -s confirms that it is really
> resending data. I examined it a bit more now and it seems OpenSSH 2.5 is
> sending a burst of small packets, each with 100 or 116 bytes 
> 
> 14:30:46.232151 server.22 > client.1525: P 30977:31077(100) ack 1144 win 24820
> 14:30:46.233358 server.22 > client.1525: P 31077:31177(100) ack 1144 win 24820
> 
> and another 50 small packets just like them rapidly after eachother.
> After this it will start to send bigger packets, 1076 or 1460 but its too
> late and its likely that the server will have to resend part of the small
> packets and connection will stall. This won't be a problem on a LAN but
> over the internet it can be. SSH Inc sshd doesn't have this problem as it 
> always send 1460 bytes per packet when possible. I have not been able to
> reproduce this with OpenSSH 2.3.0 because it seems to send 276-300 bytes
> per packet. 

This might be because our OpenSSH disables Nagle's algorithm by turning
on the TCP_NODELAY socket option.  See packet.c:packet_set_interactive()
for the code that does this.

This certainly will cause a bunch of small TCP segments to be generated,
back-to-back before an TCP ACK is received.  It's also probably a bad
idea to enable by default for every SSH interactive session.  It looks
like this gets turned on for X11 connection forwarding and for SSH
sessions with a PTY at the server end.

louie




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112012013.fB1KDJE91870>