sftp performance problem, cured by TCP_NODELAY

Miklos Szeredi miklos at szeredi.hu
Fri Jan 27 06:01:31 EST 2006


> >> Better logic to control NODELAY usage makes sense. I never looked 
> >> closely at this portion of the code but perhaps it could be triggered by 
> >> a request for remote TTY.
> > 
> > That is what the current code does.  And that is the source of the
> > bug, since NODELAY is needed for some non-interactive traffic, like
> > sftp.
> 
> I'm sorry. I must have read the previous messages wrong. I was under the 
> impression that Nagle was being disabled for interactive sessions. Which 
> is silly.

Nagle _is_ disabled for interactive sessions.  TCP_NODELAY disables
Nagle and current ssh sets TCP_NODELAY iff session is interactive.

> > Well, currently the software is doing the wrong decision, and I'm not
> > entirely convinced, that there is any other valid heuristic than to
> > turn NODELAY on unconditionally.
> 
> hurm... because the ssh code is basically unaware of what the client, in 
> this case sftp, is actually doing, right? So unless a switch is passed 
> you can't identify the specific needs of the client?

Yes.  But setting NODELAY by default seems a good idea regardless.

Miklos




More information about the openssh-unix-dev mailing list