bash:directories:place_tmp_on_a_tmpfs_partition
Differences
This shows you the differences between two versions of the page.
bash:directories:place_tmp_on_a_tmpfs_partition [2022/06/13 09:21] – created peter | bash:directories:place_tmp_on_a_tmpfs_partition [2022/06/13 09:21] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== BASH - Directories - Place /tmp on a tmpfs partition ====== | ====== BASH - Directories - Place /tmp on a tmpfs partition ====== | ||
+ | |||
+ | <WRAP important> | ||
+ | **WARNING: | ||
+ | |||
+ | Because then this tweak won't make them faster, but (much) slower. | ||
+ | </ | ||
+ | |||
+ | Speed up your system a bit by placing **/tmp** on a tmpfs partition. | ||
+ | |||
+ | Any temporary files will not be placed on the hard disk anymore, but on a virtual RAM disk instead. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | sudo cp -v / | ||
+ | sudo systemctl enable tmp.mount | ||
+ | </ | ||
+ | |||
+ | Reboot your computer. | ||
+ | |||
+ | After the reboot, check whether it works: | ||
+ | |||
+ | <code bash> | ||
+ | systemctl status tmp.mount | ||
+ | </ | ||
+ | |||
+ | By default, a tmpfs partition has its maximum size set to half your total RAM. | ||
+ | |||
+ | The actual memory consumption depends on how much you fill it up, as a tmpfs partition doesn' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== To undo tmpfs ===== | ||
+ | |||
+ | <code bash> | ||
+ | sudo rm -v / | ||
+ | </ | ||
+ | |||
+ | Reboot. | ||
bash/directories/place_tmp_on_a_tmpfs_partition.1655112087.txt.gz · Last modified: 2022/06/13 09:21 by peter