The Linux OS the tends keep Cached memory because the it decides that the Cached memory is being used and is needed which can lead to memory issues and slow down your system.
To fix this problem you can force the system to free up the stored Cached memory.
Create a script called /usr/local/bin/clearcache.sh with the following two lines:
#!/bin/sh
sync; echo 3 > /proc/sys/vm/drop_caches
run "crontab -e" and add the following line:
0 * * * * /usr/local/bin/clearcache.sh
Also make the script executable by running “chmod +x /usr/local/bin/clearcache.sh”
This should clear the Cached memory every hour.
Leave a Reply