The cache / buffer memory in Linux is nothing but a set of cache stored on the server which contains frequently visited pages. The cache configuration is done in a such a way that whenever any data is requested by RAM it will check the cache memory and serve the data from cache memory if available. At the gross level, on Xeon E5 v3 systems, reading an array that is 4x larger than the L3 cache size will clear nearly 100% of the prior data from the L1, L2, and L3 caches. This only requires process binding (e.g., 'taskset' or 'numactl -physcpubind' on Linux systems). If you want to manually clear the cache that can be done easily by sending an echo command to the /proc filesystem indicating to the kernel to drop the cache and free the memory used for the cache. The instructions for running the command were shown above in this article and the experimental validation of the cache behavior before and after flushing were also shown. Here I would like to share a script which you can use to clear your cache memory. IMPORTANT NOTICE: This is something one should not do as cache is used to speed up your work activity building a cache memory but still if you feel to clear your cache memory size then you can follow the following steps. This video illustrates the Memory management like Clear RAM Memory Cache, Buffer and Swap Space in Linux. For more explanation on this video: https://www.lin.

Are you facing a performance issue and you suspect it might be related to cache usage? Organiser. High cache usage should not normally cause performance issues, but it might be the root cause in some rare cases. Snapshot synonym.
What is Memory Cache
In order to speed operations and reduce disk I/O, the kernel usually does as much caching as it has memory By design, pages containing cached data can be repurposed on-demand for other uses (e.g., apps) Repurposing memory for use in this way is no slower than claiming pristine untouched pages.
What is the purpose of /proc/sys/vm/drop_caches
Writing to /proc/sys/vm/drop_caches allows one to request the kernel immediately drop as much clean cached data as possible. This will usually result in some memory becoming more obviously available; however, under normal circumstances, this should not be necessary.
How to clear the Memory Cache using /proc/sys/vm/drop_caches
Writing the appropriate value to the file /proc/sys/vm/drop_caches causes the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.
Clean Cache And Buffer On Centos 7
1. In order to clear PageCache only run:
2. In order to clear dentries (Also called as Directory Cache) and inodes run:
3. In order to clear PageCache, dentries and inodes run:
Running sync writes out dirty pages to disks. Normally dirty pages are the memory in use, so they are not available for freeing. So, running sync can help the ensuing drop operations to free more memory.
Page cache is memory held after reading files. Linux kernel prefers to keep unused page cache assuming files being read once will most likely to be read again in the near future, hence avoiding the performance impact on disk IO.
dentry and inode_cache are memory held after reading directory/file attributes, such as open() and stat(). dentry is common across all file systems, but inode_cache is on a per-file-system basis. Linux kernel prefers to keep this information assuming it will be needed again in the near future, hence avoiding disk IO.

How to clear the Memory Cache using sysctl
You can also Trigger cache-dropping by using sysctl -w vm.drop_caches=[number] H h software scsi & raid devices driver. command.
1. To free pagecache, dentries and inodes, use the below command.
Linux Command To Clear Memory
2. To free dentries and inodes only, use the below command.
3. To free the pagecache only, use the below command.
How Do You Clear The Cache In Linux
“Clean” cached data is eligible for dropping. “Dirty” cached data needs to be written somewhere. Using vm.drop_caches will never trigger the kernel to drop dirty cache.
