caching - what are pagecache, dentries, inodes? -


just learned these 3 new techniques https://unix.stackexchange.com/questions/87908/how-do-you-empty-the-buffers-and-cache-on-a-linux-system:


to free pagecache:

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

to free dentries , inodes:

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

to free pagecache, dentries , inodes:

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

i trying understand pagecache, dentries , inodes. they?

do freeing them remove useful memcached and/or redis cache?

--

why asking question? amazon ec2 server ram getting filled on days - 6% 95% in matter of 7 days. having run bi-weekly cronjob remove these cache. memory usage drops 6% again.

with oversimplification, let me try explain in appears context of question because there multiple answers.

it appears working memory caching of directory structures. inode in context data structure represents file. dentries data structure represents directory. these structures used build memory cache represents file structure on disk. directly listing, os go dentries--if directory there--list contents (a series of inodes). if not there, go disk , read memory can used again.

the page cache contain memory mappings blocks on disk. conceivably buffered i/o, memory mapped files, paged areas of executables--anything os hold in memory file.

your commands flush these buffers.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -