I am aware that on bare metal Linux, or a non-ZFS-based Proxmox VE host, there are advantages to having swap enabled.
So, I'm asking specifically about using swap inside VMs stored as zVols on a thin-provisioned ZFS mirror pool. I have a 4 GiB Debian 13 that I've never seen use more than 1.2 GiB of its allotted 4 GiB of RAM, to the point I might restrict it to 2 GiB soon. Debian 13's default ext4 partition scheme sets up a 2 GiB swap partition.
But, I've seen this VM use swap, even only 256 KiB.
I don't really like this. A zVol backed paravirtualized SCSI virtual disk is always going to be slower than accessing RAM directly, and I gave it it 4 GiB because it's an I/O heavy VM. I don't want to introduce avoidable latency.
So, question: What reasons should I keep this config, where an I/O-intensive VM with enough RAM to never run out of memory is swapping into a zVol-backed virtual disk? What are the downsides of turning off swap in this setup?
Thanks.
So, I'm asking specifically about using swap inside VMs stored as zVols on a thin-provisioned ZFS mirror pool. I have a 4 GiB Debian 13 that I've never seen use more than 1.2 GiB of its allotted 4 GiB of RAM, to the point I might restrict it to 2 GiB soon. Debian 13's default ext4 partition scheme sets up a 2 GiB swap partition.
But, I've seen this VM use swap, even only 256 KiB.
I don't really like this. A zVol backed paravirtualized SCSI virtual disk is always going to be slower than accessing RAM directly, and I gave it it 4 GiB because it's an I/O heavy VM. I don't want to introduce avoidable latency.
So, question: What reasons should I keep this config, where an I/O-intensive VM with enough RAM to never run out of memory is swapping into a zVol-backed virtual disk? What are the downsides of turning off swap in this setup?
Thanks.