[openstack-dev] [nova] schedule instance based on CPU frequency ?

Dugger, Donald D donald.d.dugger at intel.com
Wed Jul 15 22:57:42 UTC 2015

In re: Static CPU frequency.  For modern Intel CPUs this really isn't true.  Turbo Boost is a feature that allows certain CPUs in certain conditions to actually run at a higher clock rate that what is advertised at power on (the havoc this causes code that depends upon timing based upon CPU spin loops is left as an exercise for the reader :-)  Likewise, SpeedStep technology allows the kernel to slow down the clock by asking for different P-states, trading off lower performance for lower power drain by lowering the clock speed.  Admittedly, SpeedStep is more used on laptops to conserve battery life, not a major segment for OpenStack, but it just goes to show that the CPU frequency is technically not a constant.

Having said that, I think CPU frequency is a really bad metric to be making any kind of scheduling decisions on.  A Core I7 running at 2 GHz is going to potentially run code faster than a Core I3 running at 2.2 GHz (issues of micro-architecture and cache sizes impact performance much more than minor variations in clock speed).  If you really want to schedule based upon CPU capability you need to define an abstract metric, identify how many of these abstract units apply to the specific compute nodes in your cloud and do scheduling based upon that.  There is actually work going to do just this, check out the BP:


Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
Ph: 303/443-3786

-----Original Message-----
From: Jay Pipes [mailto:jaypipes at gmail.com] 
Sent: Friday, July 3, 2015 7:26 AM
To: openstack-dev at lists.openstack.org
Subject: Re: [openstack-dev] [nova] schedule instance based on CPU frequency ?

On 07/03/2015 06:32 AM, Sylvain Bauza wrote:
> Le 02/07/2015 21:40, Jay Pipes a écrit :
>> On 07/01/2015 12:23 AM, ChangBo Guo wrote:
>>> thanks Dan and Jay,  we don't need add new scheduler for that  :-), 
>>> what about provide cpu frequency to  api  /os-hypervisors, that  
>>> means we can report this value automatically,  the value can be used 
>>> in high level mange tools.
>> Meh, I'm not too big of a fan of the os-hypervisors extension.
>> Actually, one might say I despise that extension :)
>> That said, I suppose it should be possible to include the output of 
>> the CPU frequency in the cpu_info field there...
> Well, IMHO I don't like to have the Hypervisors API to be a 
> Nagios-like view of the hypervisors world and I don't really much 
> benefits of pusing the metrics up to the API.
> On the other hand, those monitor metrics are already sent as 
> notifications on the bus [1] so a 3rd party tool can easily fetch them 
> without necessarly needing to extend the API.

Yeah, the difference here is that CPU frequency really isn't a metric... 
it's a static thing that doesn't change over time. Which is why I think it's OK to put it in cpu_info.


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe

More information about the OpenStack-dev mailing list