Changing the Linux kernel vm.swappiness parameter

We’d like to reduce swap usage on our devices as much as possible without completely disabling this.

What is the recommendation for setting the
vm.swappiness to ‘1’ in /etc/sysctl.conf

and has anyone seen adverse behavior with it set to 1?

Thanks,
Deyan

hello deyan,

it’s the variable to define how aggressive the kernel will swap memory pages.
higher values will increase agressiveness, lower values decrease the amount of swap.
please also check kernel documentation,
for example,
$L4T_Sources/r32.5/Linux_for_Tegra/source/public/kernel/kernel-4.9/Documentation/sysctl/vm.txt

Hi Jerry,

Thank you for the reply - I know the purpose of the variable just asking if anyone has seen issues with Jetson Nano devices after setting it to 1 and what does NVidia recommend. Our desire is to discourage the kernel to put processes into swap memory as much as possible while still having swap enabled and setting the value to 1 would do this.

Regards,
Deyan

hello deyan,

we don’t have configuration for this control, it’s using the default value, 60.
thanks