clear_ram_cache_centos
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
clear_ram_cache_centos [2021/05/04 14:17] – created walkeradmin | clear_ram_cache_centos [2023/03/09 22:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 6: | Line 6: | ||
==== Introduction ==== | ==== Introduction ==== | ||
\\ | \\ | ||
- | This has been listed under IPHE, not because it is specific | + | Every Linux System |
+ | \\ | ||
+ | \\ | ||
+ | 1. Clear PageCache only. | ||
+ | sync; echo 1 > / | ||
+ | |||
+ | 2. Clear dentries and inodes | ||
+ | sync; echo 2 > / | ||
+ | |||
+ | 3. Clear PageCache, dentries and inodes. | ||
+ | sync; echo 3 > / | ||
+ | \\ | ||
+ | sync will flush the file system buffer. Command Separated by “;” run sequentially. The shell wait for each command to terminate before executing the next command in the sequence. As mentioned in kernel documentation, | ||
+ | \\ | ||
+ | \\ | ||
+ | If you have to clear the disk cache, the first command is safest in enterprise and production as “...echo 1 > ….” will clear the PageCache only. It is not recommended to use third option above “...echo 3 >” in production until you know what you are doing, as it will clear PageCache, dentries and inodes. | ||
+ | \\ | ||
+ | \\ | ||
+ | Is it a good idea to free Buffer and Cache in Linux that might be used by Linux Kernel? | ||
+ | \\ | ||
+ | \\ | ||
+ | I have found that on IPHE systems you only need to do the second option <color # | ||
+ | \\ | ||
+ | \\ | ||
+ | Taken from [[https:// | ||
\\ | \\ | ||
\\ | \\ |
clear_ram_cache_centos.1620134253.txt.gz · Last modified: 2023/03/09 22:35 (external edit)