Last active
June 12, 2024 05:40
-
-
Save denisdemaisbr/c381d1cac8776d272de7d98520a12dd1 to your computer and use it in GitHub Desktop.
ubuntu tmp ramdisk
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/sh | |
# https://unix.stackexchange.com/questions/55773/move-tmp-to-ram | |
# checkout https://wiki.debian.org/SSDOptimization/#Reduction_of_SSD_write_frequency_via_RAMDISK | |
set -e | |
set -x | |
sudo cp /usr/share/systemd/tmp.mount /etc/systemd/system/ | |
sudo systemctl enable tmp.mount | |
sudo systemctl enable fstrim.timer | |
sudo systemctl start fstrim.timer | |
sudo echo "vm.swappiness=1" > /etc/sysctl.d/local.conf | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment