This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-1.1-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push:
new 8a0b2e7073 [fix](tcmalloc) gc does not work in somecases (#14738)
8a0b2e7073 is described below
commit 8a0b2e70733d62e36c590ebad44a54ecbc7fb040
Author: Yongqiang YANG <[email protected]>
AuthorDate: Fri Dec 2 11:20:43 2022 +0800
[fix](tcmalloc) gc does not work in somecases (#14738)
---
be/src/common/daemon.cpp | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/be/src/common/daemon.cpp b/be/src/common/daemon.cpp
index fc49853bb5..da85028bb5 100644
--- a/be/src/common/daemon.cpp
+++ b/be/src/common/daemon.cpp
@@ -129,16 +129,13 @@ void Daemon::tcmalloc_gc_thread() {
to_free_bytes = std::max(to_free_bytes, tc_cached_bytes * 30 /
100);
to_free_bytes = std::min(to_free_bytes, tc_cached_bytes);
expected_aggressive_decommit = 1;
- } else {
- // release rate is enough.
- to_free_bytes = 0;
}
last_ms = kMaxLastMs;
} else if (memory_pressure > (pressure_limit - 10)) {
+ // In most cases, adjusting release rate is enough, if memory are
consumed quickly
+ // we should release manually.
if (last_memory_pressure <= (pressure_limit - 10)) {
to_free_bytes = std::max(to_free_bytes, tc_cached_bytes * 10 /
100);
- } else {
- to_free_bytes = 0;
}
}
@@ -172,6 +169,7 @@ void Daemon::tcmalloc_gc_thread() {
last_ms = 0;
}
} else {
+ DCHECK(tc_cached_bytes <= tc_used_bytes * max_cache_percent / 100);
last_ms = 0;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]