From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 2B20291876 for ; Mon, 14 Nov 2022 13:51:50 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0B5802370C for ; Mon, 14 Nov 2022 13:51:50 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 14 Nov 2022 13:51:48 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 8F50643D5B for ; Mon, 14 Nov 2022 13:51:48 +0100 (CET) Message-ID: Date: Mon, 14 Nov 2022 13:51:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Thunderbird/107.0 Content-Language: en-GB To: Leo Nunner , Proxmox VE development discussion References: <20221114120153.58169-1-l.nunner@proxmox.com> <190c1ae8-721e-88a0-3c82-f8698dce7e4c@proxmox.com> <8c6067bb-a656-431b-df29-9b65b6149f89@proxmox.com> From: Thomas Lamprecht In-Reply-To: <8c6067bb-a656-431b-df29-9b65b6149f89@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: =?UTF-8?Q?0=0A=09?=AWL -0.032 Adjusted score from AWL reputation of From: =?UTF-8?Q?address=0A=09?=BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict =?UTF-8?Q?Alignment=0A=09?=NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF =?UTF-8?Q?Record=0A=09?=SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH storage] fix #3004: show progress of offline migration in task log X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2022 12:51:50 -0000 Am 14/11/2022 um 13:23 schrieb Leo Nunner: > On 11/14/22 13:12, Thomas Lamprecht wrote: >> as unlike a TTY it cannot tell the console to override existing lines, so I >> guess this will do some periodic printing? > > Yes, as of right now, it prints a new line every second. Maybe one option to make it "prettier" > would be to limit the lines printed (by, say, only printing every nth line/second), which should > be rather simple to implement by matching the dd output in Storage.pm, where log lines are > already being parsed [1]. hmm, once every second is really a bit much; we have lots of users with big disks but relatively slow throughput, so a duration of a few hours is realistic, a poor sole may even need to wait for over a day (sending 4 TB with 50 MB/s need almost a day), which would then produce about 8.64 MB of progress information in the task log (assuming 100 bytes per round). What I always like for such things is to reduce report frequency with time, that way you provide good value/cost ratio w.r.t. reporting for both ends of the duration spectrum. E.g., start out with once every 3s, then after a minute (20 rounds) cool the frequency off to once every 10s, then after a total of ten minutes reduce further to once every 30s and keep it at that. Compared to the straight 1 Hz variant, which required ~8.64 MB, we would only need 293 KB. almost 30 times less storage.