I know some of the TrueNAS team are firmly against the use of Swap, but here is an excellent article on how swap operates with a modern Linux kernel, and how useful it can be to avoid OOM issues
personally I’m running two 8GB Swap partitions on a pair of SSD drives which provides a little bit of extra headroom if I have a badly behaved VM or Application.