4

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:

enter image description here

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?

1

3 Answers 3

10

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.

1
  • 1
    I should already know this. I guess I was confused because my other servers don't exhibit this pattern. :) Thank you for the helpful and patient answer!
    – DeeDee
    Nov 1, 2013 at 18:51
3

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.

-1

you can also run

echo 3 /proc/sys/vm/drop_caches

if you feel antsy ;)

Not the answer you're looking for? Browse other questions tagged .