[Solved] ssh: high CPU utilization under network traffic

2 posts / 0 new
Last post
#1 Tue, 07/08/2014 - 09:28

[Solved] ssh: high CPU utilization under network traffic


Trying to get to the bottom of a problem I cannot find an answer to.

Host details:
Ubuntu 12.04 64 bit
Intel i5 3.10 Ghz
1 Gbps integrated NIC

While connected to the host through ssh, the download speed is limited to max 38-40 MBps.
While the transfer is in progress, I can see 100 CPU utilization under network traffic (38-40 MBps)
From the same host, while using NFS, I can download with 100+ MBps


What would allow for more traffic?
1. Better CPU
2. Dedicated NIC
3. Both 1 and 2
4. Tweaks to my ssh configuration

Thank you.

Tue, 07/08/2014 - 16:40

Found the answer
Check out https://launchpad.net/~w-rouesnel/+archive/openssh-hpn
1.Add the ppa with: add-apt-repository ppa:w-rouesnel/openssh-hpn
2. apt-get update
3. apt-get upgrade
4. Edit /etc/default/ssh and add after = -o TCPRcvBufPoll=yes
5. Save and service ssh restart

In my setup, this lowered and spread my CPU usage throughout all my cores.
If until now, ssh was using only one core, now all 4 cores are being used.
Also, the speed increased quite a bit, reaching 60 MBps.
I suspect it can go a bit higher if write the right ticket to the right person at my ISP.

Use this at your own risk

Topic locked