[Engine-devel] CPU topology in the API

Simon Grinberg simon at redhat.com
Mon Apr 30 14:31:56 UTC 2012



----- Original Message -----
> From: "Geert Jansen" <gjansen at redhat.com>
> To: dlaor at redhat.com, "Simon Grinberg" <simon at redhat.com>
> Cc: engine-devel at ovirt.org
> Sent: Monday, April 30, 2012 5:19:41 PM
> Subject: Re: [Engine-devel] CPU topology in the API
> 
> 
> 
> On 04/30/2012 02:43 PM, Dor Laor wrote:
> >> I would go for 4 or 2
> >> Current CPU topology for the hosts is a new commit, thus it may be
> >> allowed to change it now since no one is using it yet. This works
> >> in
> >> favour of 2. In any case only 3 discloses all the information in
> >> all
> >> possible cases.
> >>
> >>
> >> Thoughts?
> >
> > If you touch any of this, please be prepared for the future:
> >   - Use hyperthreads (exists in kvm today)
> >   - Add numa topology for guest and the hosts
> >   - Add Cache info (for VMs too)
> >   - Add number of DIMMs, especially for VMs, for the upcoming
> >   memory hot
> >     plug feature.
> >   - BE ready for cpu/cpu/memory hotplug for the hosts and the
> >   guests.
> 
> Maybe there will be a time where we need this, but for now we just
> need
> the total number of cores. This is important for capacity planning.
> For
> CPU, these capacity planning tools simply add up all the fractional
> core
> usages for all VMs in a cluster, and then it has to be smaller than
> the
> number of total cores in the cluster. So it's important to know the
> total number of cores per host.
> 
> For a VM, the number of cores is sockets*cores. For a host, it is
> just
> "cores". If you would use socket*cores for a host, you'll get too
> many.
> This isn't obvious and in my view it's a bug.
> 
> Simon, I don't really see this as an API breaker by the way. The
> number
> of cores for a host was always cores*sockets even on 3.0, just that
> sockets was always equal to 1 (implicitly).

Yes, however before the fix the API only reported cores (while the socket as you mentioned where implicitly 1), so there was no confusion.
Now it reports cores and sockets but the meaning differs then the VM topology though it looks the same. 

So for VMs the tools will have to calculate cores*sockets 
For hosts they'll have to ignore the sockets parameter. 

> 
> Regards,
> Geert
> 



More information about the Devel mailing list