-
Notifications
You must be signed in to change notification settings - Fork 42
Memory Optimizations
Aaron W Morris edited this page Feb 27, 2023
·
6 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
The swappiness setting may have to be commented out in /etc/sysctl.conf
- Edit
/etc/dphys-swapfile
- Set
CONF_SWAPSIZE=512
to increase to 512MB
sudo dphys-swapfile swapoff
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
- /etc/default/armbian-zram-config
- sudo raspi-config
- 4 Performance Options -> P2 GPU Memory
- Set memory to 16MB
- Note: libcamera requires at least 32MB GPU memory for imx477 and imx378
- Reboot
sudo systemctl set-default multi-user.target
reboot