Zvol property for virtual disk

fware

New Member
Sep 21, 2017
4
0
1
56
Hello,

I discovered that the zvolume used for a disk of a VM has the primarycache property set to "all".

This does not make sense and leads to high memory usage for no benefit.
It should be "none" or "metadata".

I use none and the VM is fast. On Solaris the volumes for swap uses metadata.

My suggestion is that the default at creation is set to "none".
 
Maybe you are using SSD not HDD or other fast stuff. In my situation primary cache ARC is minimum 10-15 GB otherwise my pool can exploited from IO request.

p.s. you can set primarycache at root of the pool and others zvol will inherit it.
 
I have to play on an evaluation system with HDD and only 8 GB RAM.

So when the Windows 10 VM starts I cannot use any other VM anymore as the actions of Windows on the virtual HD fill the ARC in seconds.
As I wrote, for no benefit, as caching binary blob data is something the system can never re-use.

In terms of write back buffer it might be OK for bigger systems, but there is caching in each OS and the option in KVM.
With the caching set to no and only using the guest VM normally the tests are fine and systems are fast.

For the base OS can the LXC Containers it is fine to cache all.

So if some one has an issue with memory, it is worth a try to do a zfs set primarycache=none (or metadata) on the zvols.
 
If you decided to use ZFS you have to read how ZFS works and how to tune it.

Proxmox move forward but slowly with GUI option tuning.