It seems to be that in OS X, whenever you are out of ram the system happily swaps to disk. This easily becomes an disaster due to the fact that the swapped out memory eventually fills my drive. On my Macbook Air with 2GB ram and 64GB disk this is a major problem.
In order to solve this I've created a crontab running a purge-command every 10:th minute. It minimizes the swap from growing and also makes the system more responsive whenever the system is swapping. I've tried to disable swap but it's far to unreliable.
Can you configure this behavior? Is there a better solution?
*/10 * * * * purge