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

Andrzej Kuriata kuriata.andrzej.intc at gmail.com
Thu Jul 16 11:49:51 UTC 2015

From: Chris Friesen [mailto:chris.friesen at windriver.com]
Sent: Thursday, July 16, 2015 8:07 AM
> On 07/15/2015 04:57 PM, Dugger, Donald D wrote:
>> 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
>> :-)
> Reasonably recent machines have constant rates for the timestamp counter even in the face of CPU frequency variation.  Nobody should be using bare spin loops.
>> 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:
>> https://blueprints.launchpad.net/nova/+spec/normalized-compute-units
> I agree with the general concept, but I'm a bit concerned that the "normalized"
> units will only be accurate for the specific units being tested.  Other workloads may scale differently, especially if different CPU features are exposed (potentially allowing for much more efficient low-level instructions).

The idea is to run benchmark process at the start of nova compute.
That process could be customized to base on:
- Mega/Giga Instructions per Second (M/GIPS),
- Floating-point Operations per Second (FLOPS),
- mix of those,
- or in general, any benchmarking algorithm, most relevant to mix of
workloads run on the host.
The result of benchmarking process would be a number of Normalized
Compute Units (NCUs) which given host supports. It would also be
possible to do benchmarking differently on different hosts.
There is a backlog spec created [1] to describe the idea - I encourage
everyone interested in this topic to post comments.


[1] https://review.openstack.org/#/c/192609/

More information about the OpenStack-dev mailing list