OK, I'm an idiot. I just ran the same test on a linux->linux setup, and
sshd/ssh are both holding out at about 25% cpu utilization on ssh 2.4.0.
Is there some overhead I'm missing? I had always thought that ssh would
just use all available CPU.
strace is filled with this:
select(6, [5], [4], NULL, {0, 0}) = 0 (Timeout)
gettimeofday({980004364, 125192}, NULL) = 0
gettimeofday({980004364, 125524}, NULL) = 0
select(6, [5], [4], NULL, {0, 928615}) = 1 (out [4], left {0, 930000})
write(4, "\"&\241\356LqW\265%]\343n\325\2\305\v\21N\263h\16\222~"...,
28705) = 4096
write(4, "\275\f\374+\257\7\350\275\22\352\r\3743{\31W\f\324\341"...,
24609) = -1 EAGAIN (Resource temporarily unavailable)
read(5, 0x8093198, 4) = -1 EAGAIN (Resource temporarily
unavailable)
while trying to write the data.
Maybe a little optimization is needed after all. :)
--
Blue Lang, Unix Voodoo Priest http://www.gator.net/~blue
202 Ashe Ave, Apt 3, Raleigh, NC. 919 835 1540
"A computer is a state machine. Threads are for people who can't program
state machines." - Alan Cox, From Larry McVoy's quote page