Thursday 29 June 2017

Ubuntu has bad memory(management)(fix)

I've had a problem since I switched to ubuntu/linux. It just gets slow and freezes like crazy, and I'm not even doing much. In contrast my Windows PC is able to open about 60 tabs in chrome and allow me to play a game while that's running, with no slow-downs.

So I investigated, finally finding a solution on this askubuntu.com post:
askubuntu-link

So here's what we do:
total memory in KB: +-8000000kb (8gb)
total CPU cores: 4 cores
min_free_kbytes = (total memory * 5%) / cores = 100000kb

Set minimum free ram:
sudo sysctl -w vm.min_free_kbytes=100000

Set how much of the disk to cache:
sudo sysctl -w vm.swappiness=5

Now to make it permanent just add the following to you /etc/sysctl.conf file:
vm.swappiness=5
vm.min_free_kbytes=100000


Hope this helps someone!

Devlog 8: AI and Radar explanation.