From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id D3B4C1FF0B3 for ; Wed, 09 Sep 2026 11:29:39 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id A1AF5215BD; Wed, 09 Sep 2026 11:29:37 +0200 (CEST) Message-ID: <84b54daf-e9e7-4a95-9f84-bae209bdbf34@proxmox.com> Date: Wed, 9 Sep 2026 11:29:33 +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: Jonas Theisen , Proxmox VE development discussion References: <20260123081322.644536-1-d.csapak@proxmox.com> <38f5e579-207d-4e17-a5af-e94bc8e7b98d@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <38f5e579-207d-4e17-a5af-e94bc8e7b98d@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: 1788946165919 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.493 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: 6DIR53LM5NXSGEVQM722RIP5FYCKJTGS X-Message-ID-Hash: 6DIR53LM5NXSGEVQM722RIP5FYCKJTGS X-MailFrom: d.csapak@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 9/9/26 11:22 AM, Jonas Theisen wrote: > 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. > thanks for checking! Ok so I think lowering the threshold to 0.01% difference probably does not have the effect I'd hoped for (i.e. not refreshing too often) So I'd either render the tooltip as whole percentage too, or use 0.1% in both cases as a middle ground. What do you think? > -- > Tested-by: Jonas Theisen