There is a swappiness factory, see
Setting it to
0 will turn of swap. The recommended value is
To set this at system start use
To turn swap on and/or off use the commands
0will turn off swap completely.