cyberFund / cybernode-archive

🚀 Manager of docker images for cybernomics
MIT License
19 stars 4 forks source link

Set Mars swappiness to 10 #54

Closed abitrolly closed 7 years ago

abitrolly commented 7 years ago

Let's reopen this when we get issues.

Yesterday RethinkDB started to hit disk cache after we've run xchange-crawler. https://rethinkdb.com/docs/troubleshooting/#rethinkdb-is-running-out-of-memory One advice is to increase swapiness:

$ cat /proc/sys/vm/swappiness
60

A setting of 60 (the default for Ubuntu) means that your system will start using swap when RAM usage is at about 40%. If you’d like this to be closer to 90%, set the swappiness to 10.

abitrolly commented 7 years ago
$ cat /proc/sys/vm/swappiness
60
$ sudo sh -c 'echo "vm.swappiness = 10" > /etc/sysctl.d/60-cybernode-swappiness.conf'
$ sudo sysctl -p /etc/sysctl.d/60-cybernode-swappiness.conf
vm.swappiness = 10
$ cat /proc/sys/vm/swappiness
10