How to disable swap on jeston TX2 4GB

Hi,

I am using jetson TX2 4GB module with SDK 32.4.3.

I want to completely disable swap on from my device,by default swap on is enable.

root@tegra-ubuntu:/home/ubuntu# cat /proc/swaps
Filename Type Size Used Priority
/dev/zram0 partition 490840 0 5
/dev/zram1 partition 490840 0 5
/dev/zram2 partition 490840 0 5
/dev/zram3 partition 490840 0 5

do i need to disable nvzramconfig services or any other method in kernel is there to enable swapoff.

Any help will be appreciated.

hello anupam.kumar,

it’s by default enabled.
for example,

$ zcat /proc/config.gz | grep -ie swap
CONFIG_SWAP=y
CONFIG_MEMCG_SWAP=y
CONFIG_MEMCG_SWAP_ENABLED=y

you’re able to execute the commands to disable devices and files for paging and swapping with $ sudo swapoff
thanks