title: what are pagecache, dentries, inodes?
body: <p>Just learned these 3 new techniques from <a href="https://unix.stackexchange.com/questions/87908/how-do-you-empty-the-buffers-and-cache-on-a-linux-system">https://unix.stackexchange.com/questions/87908/how-do-you-empty-the-buffers-and-cache-on-a-linux-system</a>:</p>
  
  <hr>
  
  <p>To free pagecache:</p>
  
  <pre><code># echo 1 &gt; /proc/sys/vm/drop_caches
  </code></pre>
  
  <p>To free dentries and inodes:</p>
  
  <pre><code># echo 2 &gt; /proc/sys/vm/drop_caches
  </code></pre>
  
  <p>To free pagecache, dentries and inodes:</p>
  
  <pre><code># echo 3 &gt; /proc/sys/vm/drop_caches
  </code></pre>
  
  <hr>
  
  <p>I am trying to understand what exactly are pagecache, dentries and inodes. What exactly are they?</p>
  
  <p>Do freeing them up also remove the useful <strong>memcached</strong> and/or <strong>redis</strong> cache?</p>
  
  <p>--</p>
  
  <p>Why i am asking this question? My Amazon EC2 server RAM was getting filled up over the days - from 6% to up to 95% in a matter of 7 days. I am having to run a bi-weekly cronjob to remove these cache. Then memory usage drops to 6% again.</p>