As we know, Zero is lack in DDR size.
If you want run desktop or other "big" software, you'd better setup swap file for Zero.
Zero have 64MB DDR, and 128MB swap size is fine.
Create&enable swap file
- Create a 128MB swap file:
dd if=/dev/zero of=/swap bs=1M count=128
- Setup swap file:
- Enable swap file:
- Write to /etc/fstab, and it will be auto enabled when boot up
/swap swap swap defaults 0 0
- Make sure swap file is enable
total used free shared buffers cached
Mem: 54672 50816 3856 0 3180 28864
-/+ buffers/cache: 18772 35900
Swap: 131068 12 131056
Delete swap file
- Disable swap file
- Delete swap in /etc/fstab
swappiness: 100, most likely to use virtual memory; 0, unlikely to use.
vm.swappiness = 10
Write to config: /etc/sysctl.conf:
Run sysctl -p to take effect.