Last active
August 22, 2018 00:02
-
-
Save lordloh/c0be685caa82cbb0b68301c583f6f8dd to your computer and use it in GitHub Desktop.
This is a script I use to free up memory on my system. It syncs all IO buffers to disk, then instructs the kernel to drop all caches. However, caches exist for a reason. Manually clearing them will temporarily degrade application performance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
free -m | |
sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches" | |
free -m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment