From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, "DERUMIER,
Alexandre" <Alexandre.DERUMIER@groupe-cyllene.com>
Subject: Re: [pve-devel] cluster resource scheduler question
Date: Wed, 23 Nov 2022 12:28:12 +0100 [thread overview]
Message-ID: <cddc78c7-b6a8-e5e6-d0e9-ecb21775b80b@proxmox.com> (raw)
In-Reply-To: <0606073a4b72f9a06bbb83e5f2bcb36a9ed24ccd.camel@groupe-cyllene.com>
Am 23.11.22 um 11:18 schrieb DERUMIER, Alexandre:
> After doing some test,
>
>
> if I understand, the node static infos max-mem, max-cpu are only used
> to have percents to be able to compare each node.
>
> and the nodeusage is compute with the sum of static mem/cpu of the
> services running on this node.
>
> But I really don't see where it's node in the rust code ?
>
>
> I see a
>
> +impl StaticNodeUsage {
> + /// Add usage of `service` to the node's usage.
> + pub fn add_service_usage(&mut self, service: &StaticServiceUsage)
> {
> + self.cpu = add_cpu_usage(self.cpu, self.maxcpu as f64,
> service.maxcpu);
> + self.mem += service.maxmem;
> + }
> +}
>
>
> But I don't see where it's called ?
The Perl code calls into the PVE::RS::ResourceScheduling module. That
module acts as a FFI (generated by perlmod) for the Rust code in [0].
That Rust code then calls into the proxmox-resource-scheduling crate.
For example, at line 93, it calls the method you mentioned.
[0]
https://git.proxmox.com/?p=proxmox-perl-rs.git;a=blob;f=pve-rs/src/resource_scheduling/static.rs;h=c47dcd3477eb75d7c7f14c7c4d914179a549430e;hb=HEAD
next prev parent reply other threads:[~2022-11-23 11:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 16:43 DERUMIER, Alexandre
2022-11-23 9:09 ` Fiona Ebner
2022-11-23 10:58 ` Thomas Lamprecht
2022-11-23 10:18 ` DERUMIER, Alexandre
2022-11-23 11:28 ` Fiona Ebner [this message]
2022-11-23 12:18 ` DERUMIER, Alexandre
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=cddc78c7-b6a8-e5e6-d0e9-ecb21775b80b@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=Alexandre.DERUMIER@groupe-cyllene.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal