Probably a dumb q about scp and buffers
Christopher Rapier
rapier at psc.edu
Sat Jan 22 08:42:33 EST 2005
So I was running strace against sshd -D during an scp transfer. I
noticed that the scp child was using a buffer size of 4k for its IO
while the sshd notty was using a 16k buffer. Which seems to imply that
scp is making 4 read/writes for every 1 read/write that sshd is making.
If increase amount being read/wrote by scp to 16k then I seem to
eliminate 6 system calls per 16k of data.
By no means do I understand all the implications of making this change
in terms of security which is why I'm asking here. Does this seem like a
sensible change to make or should it make no noticable difference (using
the time command seems to indicate that we spend 15% to 25% less time in
the kernel though).
Any thoughts? Feel free to shoot this down, I'm really just poking
around at things and this popped into my head.
Chris
More information about the openssh-unix-dev
mailing list