When you run out of ram, the out-of-memory killer will start killing processes based on each processes “oom score”. You can disable swap if you are fairly certain you’ll never run OOM.
However, what you might want to look into first is changing the “vm.swappiness” sysctl value to 0, which will minimize unnecessary swapping. You’ll still have swap if needed in an emergency, but it should cut down on swapping when you aren’t actually out of memory.