From 974ee0d62da668f3bfc3dd14f84aebe3fdaa818a Mon Sep 17 00:00:00 2001 From: KemoNine Date: Mon, 10 Aug 2020 22:41:25 -0400 Subject: [PATCH] Add notes on how to move apt cache to tmpfs (ram) --- docs/README.md | 1 + docs/apt_cache_tmpfs.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 docs/apt_cache_tmpfs.md diff --git a/docs/README.md b/docs/README.md index bafc6af..555f4ac 100644 --- a/docs/README.md +++ b/docs/README.md @@ -21,6 +21,7 @@ Items marked ```REQUIRED``` are assumed to be setup and working. You've been war * [System Monitoring (REQUIRED)](monit.md) * [CPU Governor (VERY SMART)](cpu_governor.md) * [Logs in RAM (log2ram / VERY SMART)](log2ram.md) +* [Apt use RAM (VERY SMART FOR 4Gb RAM)](apt_cache_tmpfs.md) * [Pimoroni Fan Shim](pimoroni_fan_shim.md) * [HDMI Scheduled On/Off](scheduled_display.md) * [Backups via restic](restic.md) diff --git a/docs/apt_cache_tmpfs.md b/docs/apt_cache_tmpfs.md new file mode 100644 index 0000000..1a41f76 --- /dev/null +++ b/docs/apt_cache_tmpfs.md @@ -0,0 +1,18 @@ +# tmpfs apt cache + +**Please Note: this will use 512M RAM for the tmpfs (it'll usually be smaller) and can cause apt automatic updates to fail. You'll need/want to watch your logs and automatic updates if using this setup.** + +The below commands will enable tmpfs (in memory filesystem) for ```/var/cache/apt``` which has heavy disk write turnover due to automatic updates. + +``` sh + +sudo -sHu root +rm -r /var/cache/apt/* +cat >> /etc/fstab <