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?

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
DeeDee
  • 333
  • 2
  • 6
  • 16

3 Answers3

9

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.

David Schwartz
  • 31,215
  • 2
  • 53
  • 82
  • 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 01 '13 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.

Joshua Miller
  • 1,368
  • 2
  • 11
  • 14
-1

you can also run

echo 3 /proc/sys/vm/drop_caches

if you feel antsy ;)

art3mis
  • 958
  • 8
  • 4