How change swappiness and max_map_count and make them stick on reboots

Hi all,
I’m trying to set my swappiness to 10 and the max_map_count to 2147483642 (it is still showing 65530). I have discovered that I didn’t have the sysctl.conf on my system at all to begin with. So, I went ahead and created one and set the values in it. Ran the command sudo sysctl -p and rebooted, but I’m still getting my old 60 swappiness and the low number of the map count. How do I change these values permanently and make them stick across reboots? Thank you

The correct syntax seems to be, for swappiness for example:

vm.swappiness = 10

With space before and after =

1 Like

Thank you. I was able to solve it by creating a file in the /etc/systctl.d and called it 99-map-count.conf then placed the desired number in it then rebooted. Did the same with swappiness. I will mark it as solved

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.