From: Daniel Kral <d.kral@proxmox.com>
To: Daniel Herzig <d.herzig@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH qemu-server] api: vmlist: add plugged cpu count to vmlist table
Date: Fri, 17 Jan 2025 16:10:47 +0100 [thread overview]
Message-ID: <10c1643f-c7b1-4afd-8cc5-253a3546c018@proxmox.com> (raw)
In-Reply-To: <87frlnnj28.fsf@proxmox.com>
On 1/13/25 10:45, Daniel Herzig wrote:
> I just tested this patch and think it gives very valuable information.
Thanks for taking a look at this and sorry for taking some time to get
back to this.
>
> One thing I noticed, more by chance than intentional -- if the host has
> a lower cpu-count than the count configured for the VM, the stats will
> not be updated. E.g. my pve-host only has 2 cores available and if I
> configure 4 cores for the VM, `qm list` will still show 2 cores,
> although the VM is actually configured in an unbootable state.
>
> Do you think it's possible to render something like '$NUMBER:
> too_many_for_this_host' (or something similar) in this edge case?
Thanks for pointing this out!
That's interesting, in `vmstatus` we're clamping the `$cpus` property to
the maximum available cpu core count if `$sockets * $cores` above that.
But if `$vcpus` is set to something greater than that, it won't be
clamped to the maximum amount.
I've discussed this off-list with @Hannes Dürr: We've argued that this
would overbloat the `qm list` as `vmstatus` returns the clamped `$cpus`
count and we'd need to duplicate the unclamped calculation, especially
as you also pointed out that the VM is in an unbootable state.
What do you think about fixing the problem from the other side: I could
do a follow up where it's not possible to actively assign a VM more
resources than currently available, since it would not boot anyway? I
think there's a negligible amount of users who'd want to configure more
resources and only later upgrade to the required primary memory or a
heavier CPU (wrt to their core count).
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-01-17 15:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 17:09 Daniel Kral
2025-01-13 9:45 ` Daniel Herzig
2025-01-17 15:10 ` Daniel Kral [this message]
2025-01-17 15:27 ` Thomas Lamprecht
2025-01-17 16:25 ` Daniel Kral
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=10c1643f-c7b1-4afd-8cc5-253a3546c018@proxmox.com \
--to=d.kral@proxmox.com \
--cc=d.herzig@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