How to use the swap

My Jetson NX is set up with 3GB of swap partition, but I don’t use swap every time I use too much physical memory. Why is this, I have set it to 100% SWAP

Try to increase value of vm.swappiness in /etc/sysctl.conf
The default is 60 and max is 100
Moving towards 100 will make the cpu aggressively use swap


Try disabling zram by commenting /etc/systemd/

1 Like

I will also add that users of swap must be using virtual addressing, and not physical addressing. To put this in context, most end user programs use virtual addresses provided by the memory controller. Most drivers of hardware on a bus will instead use a physical address. On these forums, the most common such user is the GPU. Jetsons have an integrated GPU (iGPU) which is directly connected to the memory controller, but addressing related to this is a physical bus address. GPUs will not be able to use swap, so anything the GPU uses will not be helped with swap.

That latter statement is indirectly untrue; I say this because if some other application does not use as much physical RAM, then more RAM (physical address) memory is available. There is still a question about whether a certain size “chunk” of RAM is required for any given hardware to address it (there might be a further restriction that the RAM is contiguous, or else available in some minimal block size).

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