I recently tried installing Ubuntu on Windows (WSL2). I tried the free
command, and few blocks of swap memory were utilized. I thought of reducing the swappiness so I added the entry vm.swappiness=10
in /etc/sysctl.conf
. I tried reloading sysctl.conf
, and it seemed to work,But when I tried shutting down WSL and starting a fresh session, swappiness was reset to the default value of 60.
Is Ubuntu on WSL2 overriding this setting to make it 60 again?