On a desktop or especially laptop case, it should be equal to (or larger than) your RAM if you use hibernation (as RAM gets copied to swap during hibernation)
On my server, I set it up to be 2GBs, mostly arbitrarily. Right now it’s at 500MB, but my main memory is also only 600-800MB full out of the total 4GBs available, so I’m not running out of RAM anytime soon.
Swap behavior seems to have changed a while ago, so consider reading https://chrisdown.name/2018/01/02/in-defence-of-swap.html on how it works right now. Hell, even that might be outdated nowadays. Up to date info on how swap works really seems hard to come by.
jsyk, with how ActivityPub works changing the software that’s running from under it will break federation with you in all sorts of subtle ways. When you pick a thing to run under a domain you’re effectively locked into running that software under that domain. And of course there is some cryptographic verification as well so you change the keys (or you wipe or forget to back up the database) you may as well burn that domain from federating ever again.