No process can execute in swap "completely". The code+data must be loaded into RAM for the CPU to read/write/execute it. You can push things temporarily out to swap, but if your resident set is too small, you system will swap continuously. (Even with a SSD, loading from disk is thousands of time slower than loading from RAM.)
This constant swapping will:
1) slow down your entire system, as some of the I/O bandwidth of your disk is constantly being used
2) reduce the life of your SSD, as SSDs have a finite number of write cycles before they go bad.
Your best bet is just to create a large swap area, and run your program as normal. The OS will move the infrequently used bits out to disk. If you can't get good performance on the rest of the system, then you need more RAM. You can try to use ulimit and/or cgroups to limit the amount of RAM a process uses, but this cannot "fix" your problem.
Alternately, you could re-write the server in a more efficient language. (This is a common trade-off: The programmer could spend months optimizing the runtime CPU/memory footprint, or the business could spend more money on hardware.)