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

I have a cloud CentOS 5.5 server running Apache. I notice that my memory is very low:

             total       used       free     shared    buffers     cached
Mem:           496        484         12          0         15        266
-/+ buffers/cache:        201        294
Swap:         1023         33        990

Top shows that nothing is swallowing the memory:

 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                           
23925 apache    20   0  320m  24m 4404 S  0.0  5.0   0:00.32 httpd                                                                                                                                             
23924 apache    20   0  318m  24m 3744 S  0.0  4.9   0:00.39 httpd                                                                                                                                             
23919 apache    20   0  318m  24m 3740 S  0.0  4.9   0:00.52 httpd                                                                                                                                             
23920 apache    20   0  318m  24m 3636 S  0.0  4.8   0:00.37 httpd                                                                                                                                             
23921 apache    20   0  318m  24m 3596 S  0.0  4.8   0:00.53 httpd                                                                                                                                             
23922 apache    20   0  318m  24m 3612 S  0.0  4.8   0:00.37 httpd                                                                                                                                             
23923 apache    20   0  318m  23m 3668 S  0.0  4.8   0:00.48 httpd                                                                                                                                             
23926 apache    20   0  318m  23m 3600 S  0.0  4.8   0:00.20 httpd                                                                                                                                             
 2324 root      20   0  274m  12m 7172 S  0.0  2.6   0:18.74 httpd                                                                                                                                             
 1700 root      39  19  226m 3040 1100 S  0.0  0.6   0:02.24 yum-updatesd                                                                                                                                      
 1307 root      20   0 71620 1884  548 S  0.3  0.4   0:24.04 munin-node                                                                                                                                        
13551 root      20   0 40960 1124  744 S  0.0  0.2   0:00.44 bash                                                                                                                                              
24420 root      20   0 12800 1012  744 R  0.3  0.2   0:00.22 top          

When i restart Apache, memory seems to get freed up:

             total       used       free     shared    buffers     cached
Mem:           496        357        139          0         16        267
-/+ buffers/cache:         73        422
Swap:         1023         33        990

It seems to fall rather quickly.. I dont know what is causing this.. An input guys?

Thanks in advance..

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

5% of 496 = 24.8

You have 8 httpd processes using about 5% each Thats pretty much 200mb of memory right there.

and then you have 266MB of memory cached.

share|improve this answer
    
What is cached memory? –  Lee Mar 17 '11 at 17:12
    
As I understand it the filesystem will use any unused memory and cache it to speed up disk access. When an application needs this memory the kernel will make the cache smaller and give it to the application instead. This is probably a very basic understanding though, I'm sure there is much more involved. –  Pratik Amin Mar 17 '11 at 17:33
add comment

Your Answer

 
discard

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.