Ssh – OpenSSH takes 10x more RAM

debianssh

I've just upgraded the OpenSSH server version on my VPS from 4.3 to 5.8. For a reason each SSH session I make takes now at least 40MB Ram (It took 3-4MB before the upgrade).

My VPS has only 64MB Ram so I really need that ram, and can't find a reason how the ram usage came up by 1000%. OpenSSH is not that RAM-intensive.

The weird thing is when I try to open a SSH-1 session, it takes only 2MB ram, which is fine. Problem is that SSH-1 is not secure enough.

How can I debug the problem, or how can I get it fixed?

I'm using Debian 4 (etch).

Best Answer

Try using pmap

pmap -x <pid_of_ssh>

"pmap - report memory map of a process"

This will list all the in memory objects in use by the process.

----------------  ------  ------  ------
total kB           90168    3284     732

the RSS (resident set size) is what you are interested in, although this does show a memory usage of 90168 kB a lot of that is shared,

Related Topic