To disable memory swapping you can use the following command:

 

In order to make changes permanent you should change

example:

from

to

More info:
https://www.geeksforgeeks.org/how-to-permanently-disable-swap-in-linux/