Our default configuration should only use swap under pressure, like during web updates.
If you host a large community and start experiencing slows response times from the Discourse API you can increase the CPU/RAM of your server and re-run ./discourse-setup so it starts using the augmented resources.