aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgvit <gvit@ydb.tech>2023-06-30 18:01:03 +0300
committergvit <gvit@ydb.tech>2023-06-30 18:01:03 +0300
commit2ff48f930125529fff0923dcbfc98ceb0e688c69 (patch)
tree54676c4fec36ab64ba9dfa8fcab126082af48a85
parent28d022615dc76103427a08b312d786916fefbb7c (diff)
downloadydb-2ff48f930125529fff0923dcbfc98ceb0e688c69.tar.gz
allow to configure tcmalloc options via cms
-rw-r--r--ydb/core/cms/json_proxy_proto.h2
-rw-r--r--ydb/core/protos/config.proto29
2 files changed, 31 insertions, 0 deletions
diff --git a/ydb/core/cms/json_proxy_proto.h b/ydb/core/cms/json_proxy_proto.h
index 007dca4225b..114aea70955 100644
--- a/ydb/core/cms/json_proxy_proto.h
+++ b/ydb/core/cms/json_proxy_proto.h
@@ -74,6 +74,8 @@ protected:
return ReplyWithTypeDescription(*NKikimrConfig::TImmediateControlsConfig::TCoordinatorControls::descriptor(), ctx);
else if (name == ".NKikimrConfig.TImmediateControlsConfig.TSchemeShardControls")
return ReplyWithTypeDescription(*NKikimrConfig::TImmediateControlsConfig::TSchemeShardControls::descriptor(), ctx);
+ else if (name == ".NKikimrConfig.TImmediateControlsConfig.TTCMallocControls")
+ return ReplyWithTypeDescription(*NKikimrConfig::TImmediateControlsConfig::TTCMallocControls::descriptor(), ctx);
}
ctx.Send(RequestEvent->Sender,
diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto
index 807bd4fc7ab..c17c13715cd 100644
--- a/ydb/core/protos/config.proto
+++ b/ydb/core/protos/config.proto
@@ -1467,10 +1467,39 @@ message TImmediateControlsConfig {
DefaultValue: 0 }];
}
+ message TTCMallocControls {
+ optional uint64 ProfileSamplingRate = 1 [(ControlOptions) = {
+ Description: "Sets the sampling rate for heap profiles. TCMalloc samples approximately every rate bytes allocated.",
+ MinValue: 65536,
+ MaxValue: 4294967296,
+ DefaultValue: 2097152 }];
+ optional uint64 GuardedSamplingRate = 2 [(ControlOptions) = {
+ Description: "Sets the guarded sampling rate for sampled allocations. TCMalloc samples approximately every rate bytes allocated, subject to implementation limitations in GWP-ASan.",
+ MinValue: 65536,
+ MaxValue: 4294967296,
+ DefaultValue: 4294967296 }];
+ optional uint64 MemoryLimit = 3 [(ControlOptions) = {
+ Description: "Make a best effort attempt to prevent more than limit bytes of memory from being allocated by the system.",
+ MinValue: 0,
+ MaxValue: 9223372036854775807,
+ DefaultValue: 0 }];
+ optional uint64 PageCacheTargetSize = 4 [(ControlOptions) = {
+ Description: "Page Cache Target Size.",
+ MinValue: 0,
+ MaxValue: 137438953472,
+ DefaultValue: 536870912 }];
+ optional uint64 PageCacheReleaseRate = 5 [(ControlOptions) = {
+ Description: "Page Cache Release Rate.",
+ MinValue: 0,
+ MaxValue: 134217728,
+ DefaultValue: 8388608 }];
+ }
+
optional TDataShardControls DataShardControls = 1;
optional TTxLimitControls TxLimitControls = 2;
optional TCoordinatorControls CoordinatorControls = 3;
optional TSchemeShardControls SchemeShardControls = 4;
+ optional TTCMallocControls TCMallocControls = 5;
};
message TMeteringConfig {