ganeti

Safe HaskellSafe-Infered

Ganeti.MaintD.Balance

Contents

Description

Balancing task of the maintenance daemon.

This module carries out the automated balancing done by the maintenance daemon. The actual balancing algorithm is imported from htools.

Synopsis

Collection of dynamic load data

data AllReports Source

Constructors

AllReports 

getXenInstances :: ResultT String IO (Set String)Source

findInstanceLoad :: String -> AllReports -> Maybe DoubleSource

updateCPULoad :: (List, List) -> Container AllReports -> Set String -> [String] -> Result (List, List)Source

cleanUpEvacuation :: IORef MemoryState -> List -> Container AllReports -> String -> IO ()Source

Balancing

evacuatedInsts :: (List, List) -> MoveJob -> [String]Source

balanceGroup :: IORef MemoryState -> Set String -> Client -> Set Int -> Double -> (Int, (List, List)) -> ResultT String IO [JobId]Source

Memory balancing

weightFromMemRatio :: Double -> DoubleSource

useMemData :: Double -> Container AllReports -> (List, List) -> ResultT String IO (List, List)Source

Interface function

balanceTaskSource

Arguments

:: IORef MemoryState 
-> (List, List)

current cluster configuration

-> Set Int

node indices on which actions may be taken

-> Double

threshold for improvement

-> ResultT String IO [JobId]

jobs submitted

Carry out all the needed balancing, based on live CPU data, only touching the available nodes. Only carry out balancing steps where the gain is above the threshold.