[fix](memtracker) Process physical mem check does not include tc/jemalloc allocator cache (#12688)
tcmalloc/jemalloc allocator cache does not participate in the mem check as part of the process physical memory. because new/malloc will trigger mem hook when using tcmalloc/jemalloc allocator cache, but it may not actually alloc physical memory, which is not expected in mem hook fail. in addition: The value of tcmalloc/jemalloc allocator cache is used as a mem tracker, the parent is the process mem tracker, which is updated every 1s. Modify the process default mem_limit to 90%. expect mem tracker to effectively limit the memory usage of the process.
This commit is contained in:
@ -216,6 +216,7 @@ Status ExecEnv::_init_mem_tracker() {
|
||||
}
|
||||
#endif
|
||||
|
||||
_allocator_cache_mem_tracker = std::make_shared<MemTracker>("Tc/JemallocAllocatorCache");
|
||||
_query_pool_mem_tracker =
|
||||
std::make_shared<MemTrackerLimiter>(-1, "QueryPool", _process_mem_tracker);
|
||||
REGISTER_HOOK_METRIC(query_mem_consumption,
|
||||
|
||||
Reference in New Issue
Block a user