A value from 0 to 100 which controls the degree to which the system favors anonymous memory or the page cache. A high value improves file-system performance, while aggressively swapping less active processes out of physical memory. A low value avoids swapping processes out of memory, which usually decreases latency, at the cost of I/O performance.
The default is normally 60 in Linux but devices running custom Linux builds may change the value.
- Check / Note the default setting
- SSH in to the unit and switch to root
- run "cat /proc/sys/vm/swappiness"
- Lower the value, I normally set it to 10, but 0 would shut the swap process down, 100 would make it swap all the time.
- run "echo 10 > /proc/sys/vm/swappiness"
- run "swapoff -a"
- run "swapon -a"
Retest performance of the unit, sometimes the swapoff will fail as they is not enough memory to offload the swap data too. You will need to free up memory or reboot. Just bear in mind that the command at this time is none permanent and rebooting will switch it back to default.
This is good in case the change kills the device, rebooting will bring it back to normal. Once you are happy its fixed the issue / runs better you can do two things expand the RAM or make the charge permanent.
- SSH back in to the unit and switch to root
- Open /etc/sysctl.conf
- Add / change "vm.swappiness = 10"
- Save change
No comments:
Post a Comment