Skip to content

Commit 3899367

Browse files
authored
Remove MemoryLimit from TCMallocControls (#13008)
1 parent 7025834 commit 3899367

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

ydb/core/mon_alloc/tcmalloc.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,6 @@ class TTcMallocMonitor : public IAllocMonitor {
582582

583583
TControlWrapper ProfileSamplingRate;
584584
TControlWrapper GuardedSamplingRate;
585-
TControlWrapper MemoryLimit;
586585
TControlWrapper PageCacheTargetSize;
587586
TControlWrapper PageCacheReleaseRate;
588587

@@ -591,8 +590,6 @@ class TTcMallocMonitor : public IAllocMonitor {
591590
64 << 10, MaxSamplingRate)
592591
, GuardedSamplingRate(MaxSamplingRate,
593592
64 << 10, MaxSamplingRate)
594-
, MemoryLimit(0,
595-
0, std::numeric_limits<i64>::max())
596593
, PageCacheTargetSize(DefaultPageCacheTargetSize,
597594
0, MaxPageCacheTargetSize)
598595
, PageCacheReleaseRate(DefaultPageCacheReleaseRate,
@@ -602,7 +599,6 @@ class TTcMallocMonitor : public IAllocMonitor {
602599
void Register(TIntrusivePtr<TControlBoard> icb) {
603600
icb->RegisterSharedControl(ProfileSamplingRate, "TCMallocControls.ProfileSamplingRate");
604601
icb->RegisterSharedControl(GuardedSamplingRate, "TCMallocControls.GuardedSamplingRate");
605-
icb->RegisterSharedControl(MemoryLimit, "TCMallocControls.MemoryLimit");
606602
icb->RegisterSharedControl(PageCacheTargetSize, "TCMallocControls.PageCacheTargetSize");
607603
icb->RegisterSharedControl(PageCacheReleaseRate, "TCMallocControls.PageCacheReleaseRate");
608604
}
@@ -660,12 +656,6 @@ class TTcMallocMonitor : public IAllocMonitor {
660656
tcmalloc::MallocExtension::ActivateGuardedSampling();
661657
}
662658
tcmalloc::MallocExtension::SetGuardedSamplingRate(Controls.GuardedSamplingRate);
663-
664-
tcmalloc::MallocExtension::MemoryLimit limit;
665-
limit.hard = false;
666-
limit.limit = Controls.MemoryLimit ?
667-
(size_t)Controls.MemoryLimit : std::numeric_limits<size_t>::max();
668-
tcmalloc::MallocExtension::SetMemoryLimit(limit);
669659
}
670660

671661
void ReleaseMemoryIfNecessary(TDuration interval) {

ydb/core/protos/config.proto

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,11 +1291,9 @@ message TImmediateControlsConfig {
12911291
MinValue: 65536,
12921292
MaxValue: 4294967296,
12931293
DefaultValue: 4294967296 }];
1294-
optional uint64 MemoryLimit = 3 [(ControlOptions) = {
1295-
Description: "Make a best effort attempt to prevent more than limit bytes of memory from being allocated by the system.",
1296-
MinValue: 0,
1297-
MaxValue: 9223372036854775807,
1298-
DefaultValue: 0 }];
1294+
1295+
reserved 3; // was MemoryLimit
1296+
12991297
optional uint64 PageCacheTargetSize = 4 [(ControlOptions) = {
13001298
Description: "Page Cache Target Size.",
13011299
MinValue: 0,

0 commit comments

Comments
 (0)