Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Here's the head of the top output from my centOS 5 server, at a moment with very low load. What I want to know is whether it is using its free memory wisely to cache files from disk. Of 2G of RAM, it seems to say 1G free - then it says also 600k cached and 40k buffers. Is the 1G free, or not? How much memory is used by memory as disk cache? If that free memory is really free, is there a way to tell linux to crank up and use that free memory? Thanks!!

   top - 19:07:54 up 32 days, 15:59,  1 user,  load average: 0.45, 1.10, 0.98
Tasks: 148 total,   3 running, 144 sleeping,   1 stopped,   0 zombie
Cpu(s):  2.3%us,  0.3%sy,  0.0%ni, 97.0%id,  0.2%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   2064728k total,  1064992k used,   999736k free,    39268k buffers
Swap:  2096472k total,       92k used,  2096380k free,   668296k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
30394 mysql     15   0  262m  58m 4816 S  2.0  2.9   1455:23 mysqld
20780 apache    16   0 53644  11m 7532 R  1.0  0.6   0:05.07 httpd
15795 apache    15   0 54520  22m  17m S  0.3  1.1   0:28.03 httpd
17941 apache    15   0 53960  13m 8972 S  0.3  0.7   0:38.01 httpd
19260 apache    20   0 53360  10m 7092 S  0.3  0.5   0:01.72 httpd
20777 apache    15   0 53676  11m 7732 S  0.3  0.6   0:04.84 httpd
20778 apache    19   0 53652  13m 9652 S  0.3  0.7   0:03.48 httpd
20830 root      15   0  2324 1052  796 R  0.3  0.1   0:02.89 top
    1 root      15   0  2064  632  548 S  0.0  0.0   0:54.77 init
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.89 ksoftirqd/0
share|improve this question

migrated from stackoverflow.com Nov 27 '09 at 5:19

This question came from our site for professional and enthusiast programmers.

    
This question is far more appropriate for ServerFault, and will probably end up getting moved there. –  Dav Nov 27 '09 at 0:31

1 Answer 1

Yes, it seems that you have almost 1 GB free. Which is weird. Usually it means that you had a process using lots of memory that recently terminated, and Linux hasn't yet had the opportunity to reuse that memory for page caching. Alternatively, the system has seen so little activity since booting that again there hasn't been enough I/O going on to fill up the memory with page cache.

"Normally" you should see maybe a few dozen MB's free.

share|improve this answer

Your Answer

 
discard

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