Revision ee9724b9 Ganeti/HTools/Cluster.hs
b/Ganeti/HTools/Cluster.hs | ||
---|---|---|
198 | 198 |
, "reserved_mem_cv" |
199 | 199 |
, "offline_score" |
200 | 200 |
, "vcpu_ratio_cv" |
201 |
, "cpu_load_cv" |
|
202 |
, "mem_load_cv" |
|
203 |
, "disk_load_cv" |
|
204 |
, "net_load_cv" |
|
201 | 205 |
] |
202 | 206 |
|
203 | 207 |
-- | Compute the mem and disk covariance. |
... | ... | |
225 | 229 |
fromIntegral (offline_inst + online_inst)::Double |
226 | 230 |
cpu_l = map Node.pCpu nodes |
227 | 231 |
cpu_cv = varianceCoeff cpu_l |
228 |
in [mem_cv, dsk_cv, n1_score, res_cv, off_score, cpu_cv] |
|
232 |
(c_load, m_load, d_load, n_load) = unzip4 $ |
|
233 |
map (\n -> |
|
234 |
let DynUtil c1 m1 d1 n1 = Node.utilLoad n |
|
235 |
DynUtil c2 m2 d2 n2 = Node.utilPool n |
|
236 |
in (c1/c2, m1/m2, d1/d2, n1/n2) |
|
237 |
) nodes |
|
238 |
in [ mem_cv, dsk_cv, n1_score, res_cv, off_score, cpu_cv |
|
239 |
, varianceCoeff c_load, varianceCoeff m_load |
|
240 |
, varianceCoeff d_load, varianceCoeff n_load] |
|
229 | 241 |
|
230 | 242 |
-- | Compute the /total/ variance. |
231 | 243 |
compCV :: Node.List -> Double |
Also available in: Unified diff