Sunday, September 21, 2014

ubuntu - htop memory usage does not add up with process list

I am using lxd to run multiple containers and having trouble reporting the memory usage: both htop and free shows high memory usage but the list of processes that uses memory is very short and doesn't add up to the reported usage.



From the bare metal this is what htop shows (sorted by %MEM, userland threads hidden):
htop screen




This is top (sorted by %MEM):
top screen



And this is free -mh:



              total        used        free      shared  buff/cache   available
Mem: 15G 8.2G 5.5G 576M 1.6G 5.4G
Swap: 9G 297M 9.7G






From the htop screenshot I would expect the total memory used to be around 2G+ (adding the RES value), not 10G+. From Why does the memory usage in "top" not add up?, the reported "really used" memory is still ~6.6G.



Am I missing something, is the displayed memory reporting coherent?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...