From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 29ECD1FF14C for ; Fri, 29 May 2026 14:58:58 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EE655AD2C; Fri, 29 May 2026 14:58:57 +0200 (CEST) From: Erik Fastermann To: pve-devel@lists.proxmox.com Subject: [RFC common/manager/qemu-server 0/3] fix #1989: qemu: add qcow2 cache options Date: Fri, 29 May 2026 14:58:05 +0200 Message-ID: <20260529125808.204983-1-e.fastermann@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.023 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [drive.pm,blockdev.pm,proxmox.com,qemuserver.pm,jsonschema.pm] Message-ID-Hash: AZ34JESWZ7RCZ24S33OJ4Q5OQDQAXS3J X-Message-ID-Hash: AZ34JESWZ7RCZ24S33OJ4Q5OQDQAXS3J X-MailFrom: efastermann@ruth.proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Erik Fastermann X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi all, I'm interested in feedback for my patches fixing #1989 [0], which add multiple options to configure the qcow2 L2/refcount cache. This enables huge performance gains in some cases. I tested this for the current and older QEMU machine versions and while a VM was running. The add disk (vm creation and otherwise), import disk and edit disk dialogs were considered. I also have the following questions: - Currently I also check the file extension is qcow2, because in many cases the disk format is currently not available (especially on the frontend). Is this good enough in general? - The cache size input on the frontend is currently in bytes, because fine control might be required in some cases, but this is a little bit ugly. Is there a better way to do this? - Should the ability to control cluster_size and refcount_bits be included in this patch or should a separate bug be created? There was some discussion about this on Bugzilla [0]. - Should minimum / maximum values be defined for all options and in what way? - Should we validate that the cache sizes are multiples of the cluster size / cache entry size? - I'm using oneOf for the cache_size to support the 'based-on-disk' variant, but this does not play nice with the generated Rust API types (currently set the outer type to string, but this probably does not work). Should this be changed or the Rust generation extended or can I use a custom enum on the Rust side? - Should any extra documentation be added for this feature? Thanks for your feedback! Best, Erik [0] https://bugzilla.proxmox.com/show_bug.cgi?id=1989 pve-common: Erik Fastermann (1): json schema: display nested oneOf error messages src/PVE/JSONSchema.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) qemu-server: Erik Fastermann (1): fix #1989: disk: add qcow2 cache options src/PVE/QemuServer.pm | 33 ++++++++++++ src/PVE/QemuServer/Blockdev.pm | 33 ++++++++++++ src/PVE/QemuServer/Drive.pm | 99 ++++++++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+) pve-manager: Erik Fastermann (1): fix #1989: qemu: disk: add cache size config www/manager6/Parser.js | 2 +- www/manager6/qemu/HDEdit.js | 70 +++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) Summary over all repositories: 6 files changed, 238 insertions(+), 3 deletions(-) -- Generated by murpp 0.11.0