So I currently have a Linux VM I remote into via VNC running on my freebsd server. It's just mainly for web browsing and email - nothing crazy. The VMs disk is a block device on zfs.
Everything works fine for the most part, but over time the swap usage of the freebsd server generally climbs until I'm getting super close to the limit (4 GB). At that point, the system starts killing random processes and the VM becomes pretty slow. Meanwhile the server is using less than half of its available RAM
The only way to fix it is to shut down the VM and destroy it, after which the swap usage instantly drops to a few hundred MB.
From reading online, it seems this is something to do with ZFS's caching (ARC?) not playing nicely with the VMs disk. I've been unable to find clear instructions on how I'm supposed to properly configure this though.
Could someone help me out here? Any help would be greatly appreciated.
Everything works fine for the most part, but over time the swap usage of the freebsd server generally climbs until I'm getting super close to the limit (4 GB). At that point, the system starts killing random processes and the VM becomes pretty slow. Meanwhile the server is using less than half of its available RAM

The only way to fix it is to shut down the VM and destroy it, after which the swap usage instantly drops to a few hundred MB.
From reading online, it seems this is something to do with ZFS's caching (ARC?) not playing nicely with the VMs disk. I've been unable to find clear instructions on how I'm supposed to properly configure this though.
Could someone help me out here? Any help would be greatly appreciated.