Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a LAMP server with following configuration.

CPU : Intel(R) Xeon(R) CPU

RAM : 32 GB

HDD : 80 GB

Running on virtual environment.

All the things in the server are running smoothly. But I have noticed that the RAM usage is the server is increasing each day without any reason.

This is the current memory usage on my server.

# free -g
             total       used       free     shared    buffers     cached
Mem:            31         13         17          0          0         10
-/+ buffers/cache:          1         29
Swap:            2          0          2

And you can see the last 8 weeks memory usage below.

And i have executed the following command to find how much memory each process is consuming.

# ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }'
         0.00 Mb COMMAND 
      2253.62 Mb /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/ --skip-external-locking --socket=/var/lib/mysql/mysql.sock 
      1171.66 Mb java -jar /etc/vmagent/bin/VMAgent.jar 
       138.27 Mb /sbin/audispd 
       127.75 Mb /usr/sbin/named -u named -c /etc/named.conf -u named -t /var/named/run-root 
        74.29 Mb auditd 
        73.03 Mb automount 
        43.14 Mb /usr/bin/spamd --username=popuser --daemonize --nouser-config --helper-home-dir=/var/qmail --max-children 5 --create-prefs --virtual-config-dir=/var/qmail/mailnames/%d/%l/.spamassassin --pidfile=/var/run/spamd/ --socketpath=/tmp/spamd_full.sock 
        43.14 Mb spamd child 
        43.14 Mb spamd child 
        37.13 Mb /usr/sbin/httpd 
        37.02 Mb /usr/sbin/httpd 
        36.52 Mb /usr/sbin/httpd 
        36.46 Mb /usr/sbin/httpd 
        36.23 Mb /usr/sbin/httpd ................

For troubleshooting , i have restarted the MySQL and APACHE servers. But the result was same. Restarting the entire server will fix the issue, but i want to know what is the real issue.

Let me know if you have any idea about this issue.


Arun S

share|improve this question
Please read This explains your problems (or lack thereof). – Sven Feb 21 '12 at 10:28
up vote 3 down vote accepted

-/+ buffers/cache: 1

You're using only 1 GB. The rest is system cache.

share|improve this answer

This is perfectly normal. If you want memory not to be used, take it out of the server and put it on your desk. Free memory is wasted memory.

Linux, like most modern operating systems, can directly transition memory from one use to another. Making it free in the middle has costs associated with it and no benefits associated with it. So sensible operating systems don't do it unless they have to.

Free memory is only needed for certain very specific cases. For example, free memory is needed to hold data received over the network temporarily until the OS can process it. Because free memory has a high cost associated with it (it's as if that memory wasn't there as far as performance goes) the system only keeps as much memory free as it needs for these special situations.

share|improve this answer
"put it on your desk" lol - reminds me of the top review for the Hulzer 571 Banana slicer. Now there's an invention far more useful than RAM.… – Buttle Butkus Dec 6 '12 at 11:03
I have one of those and I love it. I used to eat bananas whole but was concerned people would stare at me because that just looks wrong. Now, I slice them, hold my thumb and index finger in a V, and smash each slice into the bottom of the V in front of my face and then lick the banana out. It feels much more natural. – David Schwartz Dec 6 '12 at 11:29

Read on this: Linux Ate My RAM

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.