-
Notifications
You must be signed in to change notification settings - Fork 47
Memory Optimizations
Aaron W Morris edited this page Apr 15, 2022
·
7 revisions
These instructions are mainly for Raspberry PI hardware. If your hardware has 4GB of memory, decreasing swappiness is probably the only useful optimization. All of the optimizations are recommended for 1GB systems.
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-swappiness.conf
sudo sysctl --system
- Edit
/etc/dphys-swapfile
- Set
CONF_SWAPSIZE=512
to increase to 512MB
sudo dphys-swapfile swapoff
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
- sudo raspi-config
- 4 Performance Options -> P2 GPU Memory
- Set memory to 16MB
- Reboot
systemctl set-default multi-user.target
reboot