I'm wondering , what is the recommended thing to do for a swap partition on a server-like system with an M.2 PCI SSD?
I'm wondering if it's wise to put swap on that device, because it's so fast that swap thrashing (which shouldn't ever happen) might go un-noticed until a significant fraction of the drive's lifetime write cycles have been consumed.
Other options include
No swap partition at all, but that will make RAM utilisation less efficient. Also diagnosis if no swapping kills the system.
Add an old slow HD for swap, so its obvious if it's used more than rarely. But that will waste electricity, and it's one more thing that could break the system.
Is there some way to give a Linux swap partition an artificial degree of slowness or a data-rate limit? Or to easily monitor and detect that a system is swapping at a high rate, although nobody is complaining that performance sucks?
Centos / RHEL 7, should it make any difference.