Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

To free pagecache:

# echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:

# echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:

# echo 3 > /proc/sys/vm/drop_caches


I am trying to understand what exactly are pagecache, dentries and inodes. What exactly are they?

Do freeing them up also remove the useful memcached and/or redis cache?

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.

1 Answer

0 votes
by (44.4k points)

An Inode is a data structure which provides a representation of a file. 

Dentries is a data structure which represents a directory or a folder. So, dentries can be used to store cache, if they exist then store or check from memory.

The page cache is anything the OS could store in the memory or hold it rather read it from a file.

No related questions found

Browse Categories

...