public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox Datacenter Manager development discussion
	<pdm-devel@lists.proxmox.com>
Subject: Re: [pdm-devel] [PATCH proxmox-datacenter-manager v3 0/6] remote task cache fetching task / better cache backend
Date: Fri, 18 Apr 2025 09:24:10 +0200	[thread overview]
Message-ID: <9cef5c43-d511-40b2-a001-b4a51afe5c62@proxmox.com> (raw)
In-Reply-To: <31497f93-68ac-4bfb-8f42-636edce9cf9f@proxmox.com>



On  2025-04-17 17:31, Thomas Lamprecht wrote:
> Am 17.04.25 um 15:22 schrieb Lukas Wagner:
>> Benchmarking was done using the 'fake-remote' feature. There were 100
>> remotes, 10 PVE nodes per remote. The task cache contained
>> about 1.5 million tasks.
>>                                                before        after
>> list of active tasks (*):                     ~1.3s          ~30µs
>> list of 500 tasks, offset 0 (**):             ~1.3s         ~500µs
>> list of 500 tasks, offset 1 million (***):    ~1.3s         ~200ms
>> Size on disk:                                 ~500MB        ~200MB
>>
>> (*):  Requested by the UI every 3s
>> (**): Requested by the UI when visiting Remotes > Tasks
>> (***): E.g. when scrolling towars the bottom of 'Remotes > Tasks'
> 
> Did you regenerate these for the current revision? Just out of interest
> whether there is any measurable effect of Wolfgangs proposed changes.

No, these are still from v1. I'll repeat the benchmark and check if there are any noteworthy
changes.
My prediction is that the impact is probably very small, but let's see if there
are any surprises.

> 
> And FWIW, I'd like to encode these also in the commit message, albeit
> with the lore links that b4 adds it's less of a problem, but IMO would
> still not really hurt to do. Depending on your answer on the actuality
> of above data I could amend that or newly provided measurements into
> the commit message on applying though, so definitively no need for a v+1
> just for that.
> 

Since there is one more thing to fix as reported by Wolfgang, I'd post a v4 with the fix
and amended commit message which includes updated benchmark results. Shouldn't take too
long I hope!

>>
>> In the old implementation, the archive file was *always* fully deserialized
>> and loaded into RAM, this is the reason why the time needed is pretty
>> idential for all scenarios.
>> The new implementation reads the archive files only line by line,
>> and only 500 tasks were loaded into RAM at the same time. The higher the offset,
>> the more archive lines/files we have to scan, which increases the
>> time needed to access the data. The tasks are sorted descending
>> by starttime, as a result the requests get slower the further you
>> go back in history.
>>
>> The 'before' times do NOT include the time needed for actually fetching
>> the task data.
>>
>> This series was preseded by [1], however almost all of the code has changes, which
>> is the reason why I send this as a new series.
>>
>> [1] https://lore.proxmox.com/pdm-devel/20250128122520.167796-1-l.wagner@proxmox.com/
>>
>> Changes since v2:
>>   - Change locking approach as suggested by Wolfgang
>>   - Incorporated feedback from Wolfang
>>      - see patch notes for details
>>   - Added some .context/.with_context for better error messages
>>
> 
> Looks alright to me now, if Wolfgang sees nothing of w.r.t. the changes
> since the last version I'd apply this series tomorrow.

-- 
- Lukas



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel

  parent reply	other threads:[~2025-04-18  7:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17 13:22 Lukas Wagner
2025-04-17 13:22 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 1/6] remote tasks: implement improved cache for remote tasks Lukas Wagner
2025-04-17 13:22 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 2/6] remote tasks: add background task for task polling, use new task cache Lukas Wagner
2025-04-17 13:22 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 3/6] remote tasks: improve locking for task archive iterator Lukas Wagner
2025-04-18  7:12   ` Wolfgang Bumiller
2025-04-17 13:22 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 4/6] pdm-api-types: remote tasks: add new_from_str constructor for TaskStateType Lukas Wagner
2025-04-17 13:22 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 5/6] fake remote: make the fake_remote feature compile again Lukas Wagner
2025-04-17 13:22 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 6/6] fake remote: clippy fixes Lukas Wagner
2025-04-17 15:31 ` [pdm-devel] [PATCH proxmox-datacenter-manager v3 0/6] remote task cache fetching task / better cache backend Thomas Lamprecht
2025-04-18  7:12   ` Wolfgang Bumiller
2025-04-18  7:24   ` Lukas Wagner [this message]
2025-04-18  8:08     ` Lukas Wagner
2025-04-18  8:33 ` [pdm-devel] superseded: " Lukas Wagner

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=9cef5c43-d511-40b2-a001-b4a51afe5c62@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    --cc=t.lamprecht@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