title: Understanding CentOS Memory usage
body: <p>I am not an OS expert, and I am having trouble understanding my server's memory usage. I need your advices to understand the following:</p>
  
  <p>My server has 8 GB RAM and operates as web server. PHP, mySQL and Apache processes consume the majority of the memory. When I issue the command "free" after the system is rebooted, I would normally see something along these lines:</p>
  
  <pre><code>             total       used       free     shared    buffers     cached
  Mem:       8059080    2277924    5781156          0        948     310852
  -/+ buffers/cache:    1966124    6092956
  Swap:      4194296          0    4092668
  </code></pre>
  
  <p>Obviously, sooner or later the free memory would drop and the cached memory would increase and I assume there is nothing wrong with that since the OS decides to cache it. </p>
  
  <p>What I don't understand is about 1-2 days later after the machine is rebooted, I would slightly see an increase in the used swap memory. Does not this mean that the server does not have free memory anymore and using IO instead? How can I understand which processes cause this?</p>
  
  <p>I am asking this question to stackoverflow users because if I ask it to my hosting provider, I am sure they would ask more money to increase RAM.
  Thanks.</p>