I've found the best way is to have a separate disk (best, but not often practical, espicially on a laptop), or at the least a separate partition.
Configure a separate swap file, of a large and constant size (i.e. minimum and maximum sizes are the same) on the second disk / partition, and remove any swap files on any other drives.
Reduces contention for disk time, stops fragmentation.