Commit de36b5c6 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Add a design to use CPU-speed as a resource

This design proposes to add relative CPU speed as a
resource to be used in the Ganeti resource model.
Implementing this design will solve issue 539.
Signed-off-by: default avatarKlaus Aehlig <>
Reviewed-by: default avatarGuido Trotter <>
parent 30350df5
......@@ -558,6 +558,7 @@ docinput = \
doc/design-chained-jobs.rst \
doc/design-cmdlib-unittests.rst \
doc/design-cpu-pinning.rst \
doc/design-cpu-speed.rst \
doc/design-daemons.rst \
doc/design-device-uuid-name.rst \
doc/design-draft.rst \
Taking relative CPU and disk speed into account
.. contents:: :depth: 4
This document describes the suggested addition of a new
node-parameter, describing the CPU speed of a node,
relative to that of a normal node in the node group.
Current state and shortcomings
Currently, for balancing a cluster, for most resources (disk, memory),
the ratio between the amount used and the amount available is taken as
a measure of load for that resources. As ``hbal`` tries to even out the
load in terms of these measures, larger nodes get a larger share of the
instances, even for a cluster not running at full capacity.
For for one resources, however, hardware differences are not taken into
account: CPU speed. For CPU, the load is measured by the ratio of used virtual
to physical CPUs on the node. Balancing this measure implictly assumes
equal speed of all CPUs.
Proposed changes
It is proposed to add a new node parameter, ``cpu_speed``, that is a
floating-point number, with default value ``1.0``. It can be modified in the
same ways, as all other node parameters.
The cluster metric used by ``htools`` will be changed to use the ratio
of virtual to physical cpus weighted by speed, rather than the plain
virtual-to-physical ratio. So, when balancing, nodes will be
considered as if they had physical cpus equal to ``cpu_speed`` times
the actual number.
Finally, it should be noted that for IO load, in non-dedicated Ganeti, the
``spindle_count`` already serves the same purpose as the newly proposed
``cpu_speed``. It is a parameter to measure the amount of IO a node can handle
in arbitrary units.
......@@ -22,6 +22,7 @@ Design document drafts
.. vim: set textwidth=72 :
.. Local Variables:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment