public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Sterz <s.sterz@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager v3 1/2] api: ceph: add applications of each pool to the lspools endpoint
Date: Fri, 21 Oct 2022 11:54:54 +0200	[thread overview]
Message-ID: <d91085bd-447a-e58a-f980-b60346b24dcf@proxmox.com> (raw)
In-Reply-To: <ae7f2f96-eb61-fed6-2f6a-646b883f8fd5@proxmox.com>

On 10/21/22 09:59, Stefan Sterz wrote:
> On 10/21/22 09:04, Thomas Lamprecht wrote:
>> Am 21/10/2022 um 08:57 schrieb Stefan Sterz:
>>>> out of interest: how expensive is this, did you check the overhead?
>>>>
>>> do you want a specific metric? in my (admittedly small) test setup
>>> (three vm cluster with 4 cores and 4Gib RAM) it is barely noticeable.
>>> the api call takes between 18 and 25ms in both cases for me.
>>>
>>
>> I mean, with a handful of pools you probably won't (or really should not)
>> see any difference >50 ms, that would make it a hard case arguing.
>>
>> Just wondered if many pools (e.g., [10, 100, 1000]) actually increase this
>> O(n) or if that falls in the noise of the rados monitor query overhead.
>>
>> I don't expect that is significant, just wondered if you already checked
>> and got some info on that.
> 
> ok so from what i can tell this is probably O(n) as it iterates once
> over all pools, but that info should be in memory and not too bad imo
> (and since this is lspools there are some other calls here that are
> likely in O(n)).
> 
> however, even if this rados command takes too long, it will time out
> after 5 seconds and then no applications will be included in the
> response. which is just the previous behavior and imo "safe".
> 
> some more detail below:
> 
> technically, one may argue this call is in O(n*m*k), with n being the
> number of pools, m the number of applications and k the number of
> metadata keys for the application. but m and k are very like very small
> if not zero (e.g. for a default rbd pool m is one and k would be zero).
> so more like O(n).
> 
> at least if i am reading this right:
> https://github.com/smithfarm/ceph/blob/v17.0.0/src/mon/OSDMonitor.cc#L6876-L6956

sorry for the many emails, just figured out that we previously dump all
this information in that api call already so we don't need to issue
another rados mon command at all. ill update this patch series accordingly

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





      reply	other threads:[~2022-10-21  9:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20  7:17 Stefan Sterz
2022-10-20  7:17 ` [pve-devel] [PATCH manager v3 2/2] ui: only allow rbd pools to be added as rbd storage Stefan Sterz
2022-10-20 13:00   ` Thomas Lamprecht
2022-10-21  7:02     ` Stefan Sterz
2022-10-21  7:13       ` Thomas Lamprecht
2022-10-20 12:55 ` [pve-devel] [PATCH manager v3 1/2] api: ceph: add applications of each pool to the lspools endpoint Thomas Lamprecht
2022-10-21  6:57   ` Stefan Sterz
2022-10-21  7:04     ` Thomas Lamprecht
2022-10-21  7:59       ` Stefan Sterz
2022-10-21  9:54         ` Stefan Sterz [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=d91085bd-447a-e58a-f980-b60346b24dcf@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pve-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