-
Notifications
You must be signed in to change notification settings - Fork 58
Disk Optimizations
Aaron W Morris edited this page Feb 14, 2025
·
11 revisions
Reducing disk I/O on SD and MMC class storage devices can significantly extend their lifetime.
You can monitor per-process disk IO with sudo iotop -oPa
systemd journald logging contributes to a significant amount of disk I/O. Changing the storage to volatile only logs to memory. This can result in an 80% reduction of IOs on a standard all sky system.

sudo mkdir /etc/systemd/journald.conf.d
sudo tee /etc/systemd/journald.conf.d/90-indi-allsky.conf <<EOF
[Journal]
Storage=volatile
Compress=yes
RateLimitIntervalSec=30s
RateLimitBurst=10000
SystemMaxUse=20M
EOF
sudo systemctl restart systemd-journald Add commit=300 to the mount options for the filesystems.
-
File:
/etc/fstabUUID=abcdabcd-1234-4c97-1234-181c2d402646 / ext4 defaults,noatime,commit=300 0 1
This will decrease the rate at which the Linux kernel will swap out memory pages to the swap file and reduce disk I/O.
echo "vm.swappiness = 1" | sudo tee /etc/sysctl.d/90-indi-allsky.conf
sudo sysctl --systemUtilize a memory backed filesystem for /tmp to reduce writes
# /etc/fstab
...
tmpfs /tmp tmpfs defaults,nosuid,size=512m 0 0
...