Stability of server when SWAP is on ZFS ZVOL.

mailinglists

Renowned Member
Mar 14, 2012
643
70
93
Hi guys.

For scary historic reasons I have set up my PM 4.* servers where ZFS is used in such a way, that SWAP was moved away from ZFS volumes, to other non ZFS volumes.

I wonder is it considered safe to have SWAP on ZVOLs (as default PM 4. install does make) now-days?
What is your experience, do you have busy servers, which do use SWAP on ZVOLs?

Here is an example of not used ZVOL for swap, from one of my servers?
rpool/swap 8.50G 371G 87.8M -

With so many crashes related to SWAP on ZVOL, I wonder why does the PM installer still create SWAP as ZVOL?
 
the PVE 5 installer improved the default properties of the created swap volume a lot, and provided your rpool is fast enough, having swap on ZFS should not be a problem. if you are swapping more than your swap storage can handle, you'll be in for a bad time no matter what storage you use ;)
 
Hi Fabian. Thank you for your reply.

What do you mean by: "improved the default properties of the created swap volume a lot".
How does it differ from PM 4? Can we implement the same changes on PM 4 installs to increase stability?

I have hard time understanding your answer. Are you saying it's still unreliable, but a bit more than before?