[ale] sshd resource intensive??

Michael D. Hirsch mhirsch at nubridges.com
Mon May 17 16:20:39 EDT 2004


On Monday 17 May 2004 03:38 pm, Geoffrey wrote:
> Michael D. Hirsch wrote:
> > On Sunday 16 May 2004 09:48 am, Geoffrey wrote:
> >>I surely expected some degradation in transmission because of the ssh
> >>overhead, but certainly not 8000%.  11 seconds to transfer a 125M file
> >>from an athlon 2400+ to pentium IV 2.4G, verses 92 seconds to transfer
> >>the same file from the athlon to a PII 350.

> > Seriously, I found that over a T1, ssh  would take up a couple of percent
> > of the CPU.  (This was a couple of years ago--it should be less with a
> > modern CPU.)  That does make the numbers you're getting a little higher
> > than I would expect.  At 1% of a CPU for T1 speed, I'd expect 10% at
> > 10-baseT and 100% for 100-baseT.  Seems like our numbers disagree by a
> > factor of 10.
>
> I wouldn't think the cpu usage would vary with the size of the pipe, if
> it did, I'd expect higher usage with a bigger pipe.  With the smaller
> pipe, you'd have it waiting on i/o.

Exactly what I was saying.  When you aren't I/O bound you become CPU bound.  A 
T1 is about 1.5 Mbps, so you end up IO bound.  With a fat pipe like 100 Mbps 
your CPU becomes a critical factor.  

> I find the cpu usage to be much higher than 1%.  When transfering a file
> 125M file from my athlon 2400 to my PIV 2400 the cpu usage on the
> sending machine was at 35-40% for ssh.  It was comparable on the
> receiving machine.  When sending the same file from the Athlon to a PII
> 350 the cpu usage was hovering around 80%.

Sounds like you are doing a fair amount of waiting for disk, too--maybe around 
40-60%.  Does the slow system have slower drives, too?  

I wonder how much readahead there is in ssh.  Does it read a block, encode a 
block, send a block sequentially, or is it threaded so that it has a thread 
reading and a thread encoding and a thread sending.  If the former, then 
there is some room for improvement.

> So our numbers are far different.

Not so different.  I was on a thin pipe about 70 times narrower than yours and 
got 1-2% cpu.  The drives were fast as it was a server system--maybe raid 
scsi.  If I were on your network, I'd expect 100-140% CPU utilization, were 
it not for the disk I/O.  If I spent 50% of the time waiting for slow drives, 
then a CPU utilization of under 50% would be expected.

Michael



More information about the Ale mailing list