From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 266B91FF0B3 for ; Wed, 09 Sep 2026 11:22:38 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 4BAAF215BE; Wed, 09 Sep 2026 11:22:35 +0200 (CEST) Message-ID: <38f5e579-207d-4e17-a5af-e94bc8e7b98d@proxmox.com> Date: Wed, 9 Sep 2026 11:22:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [pve-devel] [PATCH manager v3 1/2] ui: resource tree: use 'diskuse' instead of calculating everytime To: Proxmox VE development discussion , Dominik Csapak References: <20260123081322.644536-1-d.csapak@proxmox.com> Content-Language: en-US From: Jonas Theisen In-Reply-To: <20260123081322.644536-1-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1788945742041 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.488 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 3MFNJQTYRNJANEXBPUWGWZZMV2XEMXQD X-Message-ID-Hash: 3MFNJQTYRNJANEXBPUWGWZZMV2XEMXQD X-MailFrom: j.theisen@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 X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 1/23/26 09:12, Dominik Csapak wrote: > the resource store has a field 'diskuse' which it calculates on update. > Use that instead of calculating the value ourselves everytime. > > For change detection, we only need a resolution of 0.01 (since we want > to use the percentage as integer) so check that the difference of old and new > is bigger than 0.9% . > > This works because we only overwrite the values in the treestore if > anything changed, so multiple small changes to the diskuse will not be > lost. > > Signed-off-by: Dominik Csapak > --- > Applied and tested the patch on top of current pve-manager 9.2.18 Tested VM state changes and storage usage changes on a single node Problem: The tooltip style usage shown when hovering over a storage reports the usage with two decimal places so per mille. Due to the update logic only triggering on changes of 1% or greater, a change smaller than that will cause the tooltip to get out of sync from the actual usage reported by the status page. -- Tested-by: Jonas Theisen