This option will allow to change the weight with which dynamic memory utilization is taken into account in the cluster metrics. Depending on over commitment and the way the dynamic utilization changes a higher value might be necessary to avoid swapping.
Signed-off-by: Klaus Aehlig <[email protected]> --- src/Ganeti/HTools/CLI.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Ganeti/HTools/CLI.hs b/src/Ganeti/HTools/CLI.hs index b712c62..b941013 100644 --- a/src/Ganeti/HTools/CLI.hs +++ b/src/Ganeti/HTools/CLI.hs @@ -59,6 +59,7 @@ module Ganeti.HTools.CLI , oDiskTemplate , oSpindleUse , oDynuFile + , oMemWeight , oMonD , oMonDDataFile , oMonDKvmRSS @@ -167,6 +168,8 @@ data Options = Options -- considered (only if MonD is queried) , optMonDExitMissing :: Bool -- ^ If the program should exit on missing -- MonD data + , optMemWeight :: Double -- ^ Rescale the weight of memory + -- utilisation , optEvacMode :: Bool -- ^ Enable evacuation mode , optRestrictedMigrate :: Bool -- ^ Disallow replace-primary moves , optExInst :: [String] -- ^ Instances to be excluded @@ -241,6 +244,7 @@ defaultOptions = Options , optMonDXen = False , optMonDKvmRSS = False , optMonDExitMissing = False + , optMemWeight = 1.0 , optEvacMode = False , optRestrictedMigrate = False , optExInst = [] @@ -390,6 +394,14 @@ oMonDKvmRSS = "also consider residual-set-size data for kvm instances via MonD", OptComplNone) +oMemWeight :: OptType +oMemWeight = + (Option "" ["mem-weight"] + (reqWithConversion (tryRead "memory weight factor") + (\ f opts -> Ok opts { optMemWeight = f }) "FACTOR") + "Rescale the weight of the memory utilization by the given factor", + OptComplFloat) + oMonDExitMissing :: OptType oMonDExitMissing = (Option "" ["exit-on-missing-mond-data"] -- 2.6.0.rc2.230.g3dd15c0
