I've heard "square root of physical memory" as a heuristic, although in practice I use less than this with some of my larger systems.
"Make the swap large enough to keep all inactive anonymous pages after the workload has stabilized, but not too large to cause swap thrashing and a delayed OOM kill if a fast memory leak happens" is not.