[kata-dev] Performance isolation: expectations for number of CPUs

Eric Ernst eric.g.ernst at gmail.com
Thu Jul 1 14:55:29 UTC 2021


In this example, you’ll want to clarify what the CPUs requested means. I’ll assume limits=request, and that you’re referring to a kubernetes pod. Based on that I’d expect 12. I would not recommend four default vCPUs though. 

Eric

Sent from my iPhone

> On Jul 1, 2021, at 3:54 AM, Christophe de Dinechin <dinechin at redhat.com> wrote:
> 
> An interesting question arose about the number of CPUs we want to get in the VM, notably in the context of https://github.com/kata-containers/kata-containers/issues/2071 as well as regarding https://github.com/kata-containers/kata-containers/pull/2131, a fix for https://github.com/kata-containers/kata-containers/issues/2130.
> 
> Let's say that we have two containers A and B requesting 5 and 3 CPUs respectively. How many CPUs should we get in the VM? Let us assume that the default number of VCPUs is 4.
> 
> Possible answers:
> 
> A) 4 (default number of VCPUs), because the current OCI spec does not give us information about the number of CPUs. That's how I interpret Julio's answer, https://github.com/kata-containers/kata-containers/issues/2071#issuecomment-865034753.
> 
> B) 5 (maximum request). This seems to be more or less how the Rust agent behaves today, making sure that each time there is a request, we online at least that many CPUs.
> 
> C) 8 (sum of requests for all containers). If the two containers request CPUs, they have good reasons to, so we should honor both requests independently. This seems to be what the runtime has in mind, since it hotplugs the new CPUs and the struct VM field is called "cpusDelta"
> 
> D) 6 (maximum request, plus one for the agent). During the performance isolation meetings, we seem to have shifted towards the idea that the agent should get a dedicated CPU.
> 
> E) 9 (maximum request, plus one for the agent)
> 
> F) 9 (maximum request plus the four original)
> 
> G) 12 (sum of requests plus the four original)
> 
> H) 42 (the correct answer in most cases)
> 
> What do you think? 
> 
> 
> _______________________________________________
> kata-dev mailing list
> kata-dev at lists.katacontainers.io
> http://lists.katacontainers.io/cgi-bin/mailman/listinfo/kata-dev



More information about the kata-dev mailing list