Ramdisks will go to swap. A memory leak will force the entire ramdisk into swap, and reading it back into memory afterward is 10 to 100 times slower than reading normal files off of a disk.
If you have a memory leak, and a ramdisk, and no swap then the OOM killer will trigger.
Hopefully it will target the program with the memory leak, but this is not guaranteed.
Swap is useful because you can shift unused memory onto disk. There are many programs that allocate (and write) a lot of memory that they never afterward use.
By having swap you make more room for cache in memory.
SSD doesn't matter here - this is not swap thrashing, but rather occasional writes.
Ramdisks will go to swap. A memory leak will force the entire ramdisk into swap, and reading it back into memory afterward is 10 to 100 times slower than reading normal files off of a disk.