Why is RAM usage so high on an idle server? [duplicate]
I'm investigating a server used for scientific data analysis. It's running RHEL 6.4 It has almost 200GB of RAM. It's been running very slowly for users via SSH, and after some poking around I quickly noticed that the RAM usage was sky-high. What's odd is that even in an idle state it's still using a ton of RAM:
I also looked via htop
and I can't see that any running process is using more than 0.1% of the RAM. So I wonder what's going on? Right now the only user-initiated process running is an rsync between two NFS-mounted shares.
I tried rebooting the server and it was much more responsive for a few minutes, but then memory usage shot up again.
Is there any way I can pinpoint why memory usage is so high?
It's high because that saves effort. It takes effort to make memory free. And if you do that, it just takes effort to make it used again. So, to save effort, modern operating systems only make memory free if they have absolutely no other choice.
If you're thinking "I want memory free now so I can use it later", banish that thought from your mind. Memory does not have to be free now to use it later. It can be used now and also be used later. So there's no painful tradeoff here. Using memory is a pure win.
Whatever your problem is, high memory usage is not it. That's a sign of a normally functioning system.
About 190G of your memory is being used by the filesystem cache, which normally isn't really a problem.
Look at the cached
field in top.