Safe Haskell | Safe-Infered |
---|
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.
- data AllReports = AllReports {}
- emptyReports :: AllReports
- queryNode :: Node -> ResultT String IO AllReports
- queryLoad :: List -> ResultT String IO (Container AllReports)
- getXenInstances :: ResultT String IO (Set String)
- findInstanceLoad :: String -> AllReports -> Maybe Double
- updateCPUInstance :: List -> Container AllReports -> Set String -> [String] -> Instance -> Result Instance
- updateCPULoad :: (List, List) -> Container AllReports -> Set String -> [String] -> Result (List, List)
- cleanUpEvacuation :: IORef MemoryState -> List -> Container AllReports -> String -> IO ()
- moveToJob :: Timestamp -> (List, List) -> MoveJob -> [MetaOpCode]
- iterateBalance :: AlgorithmOptions -> Table -> [MoveJob] -> [MoveJob]
- evacuatedInsts :: (List, List) -> MoveJob -> [String]
- balanceGroup :: IORef MemoryState -> Set String -> Client -> Set Int -> Double -> (Int, (List, List)) -> ResultT String IO [JobId]
- weightFromMemRatio :: Double -> Double
- useMemData :: Double -> Container AllReports -> (List, List) -> ResultT String IO (List, List)
- balanceTask :: IORef MemoryState -> (List, List) -> Set Int -> Double -> ResultT String IO [JobId]
Collection of dynamic load data
queryNode :: Node -> ResultT String IO AllReportsSource
getXenInstances :: ResultT String IO (Set String)Source
findInstanceLoad :: String -> AllReports -> Maybe DoubleSource
updateCPUInstance :: List -> Container AllReports -> Set String -> [String] -> Instance -> Result InstanceSource
updateCPULoad :: (List, List) -> Container AllReports -> Set String -> [String] -> Result (List, List)Source
cleanUpEvacuation :: IORef MemoryState -> List -> Container AllReports -> String -> IO ()Source
Balancing
iterateBalance :: AlgorithmOptions -> Table -> [MoveJob] -> [MoveJob]Source
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
:: 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.