public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Leo Nunner <l.nunner@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH storage] fix #3004: show progress of offline migration in task log
Date: Mon, 14 Nov 2022 13:51:47 +0100	[thread overview]
Message-ID: <d515c868-9b90-d583-4fab-2b8714b4f546@proxmox.com> (raw)
In-Reply-To: <8c6067bb-a656-431b-df29-9b65b6149f89@proxmox.com>

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.





      reply	other threads:[~2022-11-14 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 12:01 Leo Nunner
2022-11-14 12:12 ` Thomas Lamprecht
2022-11-14 12:23   ` Leo Nunner
2022-11-14 12:51     ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d515c868-9b90-d583-4fab-2b8714b4f546@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=l.nunner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal