On 4/2/25 12:36, Laurențiu Leahu-Vlăducu wrote:
Is it a good idea to use cache=auto by default? I know that "cache=auto" is the upstream default, but I was wondering whether it's not safer to use "never" by default in PVE to minimize the amount of potential issues. Feel free to contradict me, though ;)

By searching the internet I found some reports regarding cache=auto, e.g. https://discuss.linuxcontainers.org/t/current-state-of-virtiofs- under-virtual-machines/19166

Good point!

Additionally, there's a 'metadata' option upstream which seems like a compromise and might be another good option to add as soon as it's available from the Debian repositories or build them ourselves.

On 4/2/25 12:36, Laurențiu Leahu-Vlăducu wrote:
I think some of these options should be marked as advanced, as they won't be needed in most cases (feel free to contradict me, though).

While it's not always immediately clear what some of these options do, I think it's hard to summarize the functionality in a short tooltip, so linking to the docs (as you already do) is fine to me.

What is still unclear to me is what some caching combinations do, e.g. the user can set Cache to Never, but can also enable "Writeback cache". I know this has to do with QEMU and you simply exposed the GUI for setting the advanced options, but I was just wondering whether it wouldn't be possible to expose these options to our users in a way that the difference between the modes is clearer, e.g. "Read cache" and "Writeback cache". Feel free to use some entirely different naming, though ;)

I also agree putting it at least in the "Advanced" section, but I'd not change the names too much from what virtiofs is exposing, but rather make it clear in the documentation or in some other form what the difference between both are.

The cache policy set by `cache={auto,always,never}` sets O_DIRECT for files with `cache=never` and FUSE's `KEEP_CACHE` for files with `cache=always` [0].

Some details for the writeback option are documented here [1].

[0] https://gitlab.com/virtio-fs/virtiofsd/-/blob/main/src/passthrough/mod.rs#L953 [1] https://gitlab.com/virtio-fs/virtiofsd/-/blob/main/src/passthrough/mod.rs#L231


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to