This is an automated email from the ASF dual-hosted git repository.

zouxinyi pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/dev-1.1.2 by this push:
     new 0832267197 [enhancement](tcmalloc) disable 
tcmalloc.aggressive_memory_decommit (#12427)
0832267197 is described below

commit 08322671971d53a93ec55dd36d59c8b4e81c79d7
Author: yixiutt <[email protected]>
AuthorDate: Wed Sep 7 19:41:24 2022 +0800

    [enhancement](tcmalloc) disable tcmalloc.aggressive_memory_decommit (#12427)
    
    This modification will double the performance of some cases, but will cause 
the BE process to use more memory.
    Expect better manual gc strategies in the future to avoid excessive memory 
usage.
---
 be/src/runtime/bufferpool/system_allocator.cc | 7 -------
 be/src/service/doris_main.cpp                 | 3 ---
 2 files changed, 10 deletions(-)

diff --git a/be/src/runtime/bufferpool/system_allocator.cc 
b/be/src/runtime/bufferpool/system_allocator.cc
index 1368b93a35..3cd02b6673 100644
--- a/be/src/runtime/bufferpool/system_allocator.cc
+++ b/be/src/runtime/bufferpool/system_allocator.cc
@@ -45,13 +45,6 @@ static int64_t HUGE_PAGE_SIZE = 2LL * 1024 * 1024;
 
 SystemAllocator::SystemAllocator(int64_t min_buffer_len) : 
min_buffer_len_(min_buffer_len) {
     DCHECK(BitUtil::IsPowerOf2(min_buffer_len));
-#if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER) && 
!defined(LEAK_SANITIZER)
-    // Free() assumes that aggressive decommit is enabled for TCMalloc.
-    size_t aggressive_decommit_enabled;
-    
MallocExtension::instance()->GetNumericProperty("tcmalloc.aggressive_memory_decommit",
-                                                    
&aggressive_decommit_enabled);
-    CHECK_EQ(true, aggressive_decommit_enabled);
-#endif
 }
 
 Status SystemAllocator::Allocate(int64_t len, BufferPool::BufferHandle* 
buffer) {
diff --git a/be/src/service/doris_main.cpp b/be/src/service/doris_main.cpp
index 37d08a2a38..bce288d6de 100644
--- a/be/src/service/doris_main.cpp
+++ b/be/src/service/doris_main.cpp
@@ -315,9 +315,6 @@ int main(int argc, char** argv) {
     }
 
 #if !defined(ADDRESS_SANITIZER) && !defined(LEAK_SANITIZER) && 
!defined(THREAD_SANITIZER)
-    // Aggressive decommit is required so that unused pages in the TCMalloc 
page heap are
-    // not backed by physical pages and do not contribute towards memory 
consumption.
-    
MallocExtension::instance()->SetNumericProperty("tcmalloc.aggressive_memory_decommit",
 1);
     // Change the total TCMalloc thread cache size if necessary.
     if (!MallocExtension::instance()->SetNumericProperty(
                 "tcmalloc.max_total_thread_cache_bytes",


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to