[PATCH] Added NoDelay config option and nodelay subsystem option

Tobias Ringstrom tori at ringstrom.mine.nu
Wed Jan 30 02:39:43 EST 2002


On Tue, 29 Jan 2002, Nicolas Williams wrote:

> What is the current consensus?
> 
> Here's what I see so far:
> 
>  - non-SSH sockets: turn on TCP_NODELAY (all agree)
> 
>  - SSH connections, short term:
> 
>     - turn on TCP_NODELAY for interactive sessions (Markus; current state)

Which goes against all logic and theory, right?  :-)

>     - turn on TCP_NODELAY for all sessions (Tobias)

As a short time solution, yes.  An option to turn Nagle back on for 
pty sessions (with no forwarding) would be nice.

>     - turn on TCP_NODELAY for all sessions that have active port or
>       display forwarding or which are not exec sessions (myself)

If we can agree that Nagle should be on for pty sessions, it should be 
on iff the current ssh connection only contains pty sessions, i.e. no port 
forwarding channels, no sftp, no x11, etc.

>  - SSHv2 connections, longer-term:
> 
>     - add a per-channel TCP_NODELAY channel request (Markus; I second)

This is very nice, but can we do this without breaking the (draft) RFC?  
Can it be done compatibly with older versions?

>     - add a per-channel Nagle at the SSHv2 layer (myself, but not convinced)

I'm convinced that this cannot be Nagle-like, since the Nagle algorithm i
needs to know whether there is any outstanding data on the connection.

> Something is needed to make X11 display forwarding a happy thing and
> improve SFTP performance.

X11 already uses TCP_NODELAY, so that's not a problem.

> The latter can probably be done by coallescing the write()s of those two
> packets that trigger Nagle.

That requires delaying the window adjustment packet until we have another
packet to send, and to send them together.  A timeout is also needed, but 
the real problem is that this breaks down (I think) when we have 
overlapping requests, which I really hope we will have real soon.  In 
other words, sftp wants TCP_NODELAY.

> The former can be a trivial heuristic. All other TCP port forwarding
> should really be done without Nagle as well.
> 
> What is a reasonable short-term consensus on when SSHv2 connections
> should have TCP_NODELAY set on both sides?

This is what I'd like to know as well...

/Tobias




More information about the openssh-unix-dev mailing list