Commit 34a6e127 authored by Iustin Pop's avatar Iustin Pop
Browse files

Change the N1 score to percent of N1 failures

Since for a very many N+1 failures in a cluster, we could actually
degrade the N1 CV by making a node N+1 compliant, we need to make sure
this value only decreases when fixing non-compliant nodes.

The easiest way is to compute the N+1 score as a percentage of failed
nodes, with the caveat that the domain of values might not be fully
compatible with the other scores. It is still [0, 1] but does not vary
like the others.
parent d6be0775
......@@ -580,11 +580,11 @@ compDetailedCV nl =
dsk_l = map Node.p_dsk nodes
mem_cv = varianceCoeff mem_l
dsk_cv = varianceCoeff dsk_l
n1_l = map (\n -> if Node.failN1 n then 1 else 0) nodes
n1_cv = varianceCoeff n1_l
n1_l = length $ filter Node.failN1 nodes
n1_score = (fromIntegral n1_l) / (fromIntegral $ length nodes)
res_l = map Node.p_rem nodes
res_cv = varianceCoeff res_l
in (mem_cv, dsk_cv, n1_cv, res_cv)
in (mem_cv, dsk_cv, n1_score, res_cv)
-- | Compute the 'total' variance.
compCV :: NodeList -> Double
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