Re: [kubevirt-dev] Re: CPU resources are oversold

10 views
Skip to first unread message

Luboslav Pivarc

unread,
Jun 28, 2024, 9:09:08 AM (5 days ago) Jun 28
to Meteor CAI, kubevirt-dev
Hi,
This depends entirely on the VM configuration and Kubevirt configuration. By default if you only ask for cores/threads/sockets without dedicated resources the resulting request on underlying Pod will be only ratio. CPUAllocationRatio is the key element here, defaulted to 10 which translates that per each CPU we only request 100m or 1/10 of cpu. See https://kubevirt.io/user-guide/compute/resources_requests_and_limits/ for more description how this works.

-Lubo

On Wed, Jun 26, 2024 at 9:11 AM Meteor CAI <caime...@gmail.com> wrote:
I have always believed that the resources in K8S are reserved mechanisms, and the resources applied for by one VM will be reserved, and will not be applied for by other VMS. 

The actual experiment was not: host 64 cores, create the first VMI for 48 cores, and then go on to create the second VMI for 48 cores, which was also successful. 

Did I get it wrong?

On Wednesday, June 26, 2024 at 2:47:10 PM UTC+8 Meteor CAI wrote:
When creating a VM instance, why can I apply for more CPU cores than the total cores of the host?
What you see through the "kubectl describe node $NODE"  command is not the cores of the VM application, but the cores of the pod application. 
How can I view the total number of cores applied for by VMS on a host?
How to prevent CPU resource oversold?

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/b6fba42e-cab9-47e6-9f97-40ec0eb24fd4n%40googlegroups.com.

Alexander Wels

unread,
Jun 28, 2024, 9:09:08 AM (5 days ago) Jun 28
to Meteor CAI, kubevirt-dev
KubeVirt has a default cpu overcommit ratio of 1 to 10. See this documentation on how to change that https://kubevirt.io/user-guide/compute/node_overcommit/#node-cpu-allocation-ratio
Reply all
Reply to author
Forward
0 new messages