diff options
author | xenoxeno <xeno@ydb.tech> | 2022-08-31 11:57:45 +0300 |
---|---|---|
committer | xenoxeno <xeno@ydb.tech> | 2022-08-31 11:57:45 +0300 |
commit | 5bab410d7788ca1548c742d56affc7cd02ab561f (patch) | |
tree | 5da29e44c34c006ec76c10982a3c05342393ea6f | |
parent | bcd6b2653a988889aa6d990f5f30ca0ecac41a54 (diff) | |
download | ydb-5bab410d7788ca1548c742d56affc7cd02ab561f.tar.gz |
limit pools to watch for usage
-rw-r--r-- | ydb/core/mind/local.cpp | 8 | ||||
-rw-r--r-- | ydb/core/protos/config.proto | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ydb/core/mind/local.cpp b/ydb/core/mind/local.cpp index 65f6ff3e00d..2867e47adf8 100644 --- a/ydb/core/mind/local.cpp +++ b/ydb/core/mind/local.cpp @@ -15,6 +15,7 @@ #include <library/cpp/actors/core/log.h> #include <util/system/info.h> +#include <util/string/vector.h> #include <unordered_map> #include <unordered_set> @@ -662,8 +663,13 @@ class TLocalNodeRegistrar : public TActorBootstrapped<TLocalNodeRegistrar> { } usage = static_cast<double>(MemUsage) / MemLimit; } + + TVector<TString> poolsToMonitorForUsage = SplitString(AppData()->HiveConfig.GetPoolsToMonitorForUsage(), ","); + for (const auto& poolInfo : info.poolstats()) { - usage = std::max(usage, poolInfo.usage()); + if (Find(poolsToMonitorForUsage, poolInfo.GetName()) != poolsToMonitorForUsage.end()) { + usage = std::max(usage, poolInfo.usage()); + } } NodeUsage = usage; diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto index 89177e53dbe..99d1520b821 100644 --- a/ydb/core/protos/config.proto +++ b/ydb/core/protos/config.proto @@ -1423,6 +1423,7 @@ message THiveConfig { optional EHiveNodeSelectStrategy NodeSelectStrategy = 45 [default = HIVE_NODE_SELECT_STRATEGY_RANDOM_MIN_7P]; optional bool CheckMoveExpediency = 46 [default = true]; optional uint64 StoragePoolFreshPeriod = 47 [default = 60000]; // milliseconds + optional string PoolsToMonitorForUsage = 48 [default = "System,User,IC"]; } message TDataShardConfig { |