Last active
July 15, 2020 20:40
-
-
Save pallas/da8f67e319db2c85de742a6de5a3351b to your computer and use it in GitHub Desktop.
Spring clean memory on Linux systems
This file contains 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 | |
# SPDX-License-Identifier: Unlicense | |
# Author: Derrick Lyndon Pallas <[email protected]> | |
sync && | |
echo 3 > /proc/sys/vm/drop_caches && | |
echo 1 > /proc/sys/vm/compact_memory && | |
true | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As described in https://www.kernel.org/doc/Documentation/sysctl/vm.txt