How to Clear RAM Memory Cache, Buffer and Swap Space on Linuxby Editor | Published: June 6, 2015 | Last Updated: June 28, 2016 Linux Certifications - RHCSA / RHCE Certification | Ansible Automation Certification | LFCS / LFCE Certification Like any other operating system, GNU/Linux has implemented a memory management efficiently and even more than that. But if any process is eating away your memory and you want to clear it, Linux provides a way to flush or clear ram cache. How to Clear Cache in Linux?Every Linux System has three options to clear cache without interrupting any processes or services. 1. Clear PageCache only. 2. Clear dentries and inodes. 3. Clear PageCache, dentries and inodes. Explanation of above command. sync will flush the file system buffer. Command Separated by If you have to clear the disk cache, the first command is safest in enterprise and production as Is it a good idea to free Buffer and Cache in Linux that might be used by Linux Kernel?When you are applying various settings and want to check, if it is actually implemented specially on I/O-extensive benchmark, then you may need to clear buffer cache. You can drop cache as explained above without rebooting the System i.e., no downtime required. Linux is designed in such a way that it looks into disk cache before looking onto the disk. If it finds the resource in the cache, then the request doesn’t reach the disk. If we clean the cache, the disk cache will be less useful as the OS will look for the resource on the disk. Moreover it will also slow the system for a few seconds while the cache is cleaned and every resource required by OS is loaded again in the disk-cache. N |
Home > Server config >