sftp performance problem, cured by TCP_NODELAY
Rick Jones
rick.jones2 at hp.com
Fri Jan 27 06:52:41 EST 2006
>>However, the former looks like a classic case of an "unfortuneate"
>>(if being dimplomatic, "buggy" if not) coding practice that quite
>>easily runs afoul of Nagle - writing "logically associated data" to
>>the connection in separate calls.
>
>
> Yes, this is unfortunate. But I fixed it (see patch below) and it
> didn't help. I think this would have actually triggered multiple
> writes only very rarely on UP, since ssh would need to be scheduled in
> between the two writes to actually see the split message, otherwise
> the pipe would merge the two writes before it gets to ssh.
A wise old engineer once told me the proper spelling was ass-u-me :) (Not that
I'm perfect in following that advice mind you...)
>
> On SMP this may be worse, and applying the patch is a good idea anyway.
>
> It seems that sftp-server is already doing the right thing.
>
>
>>Assuming my brief syscall trace analysis is correct and if that
>>behaviour is the same in the contemporary versions of sftp, it might
>>be better to fix that before asking to do TCP_NODELAY.
>
>
> Done. Can I now have my NODELAY please ;)
Got a syscall and packet trace showing "the right thing" being done?-)
rick
More information about the openssh-unix-dev
mailing list