Commit 1e82a030 authored by Klaus Aehlig's avatar Klaus Aehlig

Add effective CPU overcommitment as derived node parameter

Add a derived parameter for nodes, providing the ratio of
virtual CPUs per CPU-speed weighted physical CPU.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 6fbf6b4d
......@@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
module Ganeti.HTools.Node
( Node(..)
, List
, pCpuEff
-- * Constructor
, create
-- ** Finalization after data loading
......@@ -167,6 +168,11 @@ instance T.Element Node where
setIdx = setIdx
allNames n = [name n, alias n]
-- | Derived parameter: ratio of virutal to pysical CPUs, weighted
-- by CPU speed.
pCpuEff :: Node -> Double
pCpuEff n = pCpu n / tCpuSpeed n
-- | A simple name for the int, node association list.
type AssocList = [(T.Ndx, Node)]
......
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