This is an automated email from the ASF dual-hosted git repository.
zouxinyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 57f7c861744 [fix](memory) Modified low water mark=min(6.4G, MemTotal *
5%) (#37525)
57f7c861744 is described below
commit 57f7c86174437b5ad410b11680e95bd9bb2932ed
Author: Xinyi Zou <[email protected]>
AuthorDate: Thu Jul 11 14:35:56 2024 +0800
[fix](memory) Modified low water mark=min(6.4G, MemTotal * 5%) (#37525)
On 64G machine, warning water mark is 12.8G. when system available
memory reaches the warning water mark, load memtable will flush, this is
not a good idea.
`mem_limit` default 10%, except for the memory used by the Linux kernel
, buffer may be around 5%, so low water mark=min(6.4G, MemTotal * 5%)
looks better.
---
be/src/common/config.h | 6 +++---
be/src/util/mem_info.cpp | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/be/src/common/config.h b/be/src/common/config.h
index 2ed060cde6b..54451b97607 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -159,9 +159,9 @@ DECLARE_mInt32(max_fill_rate);
DECLARE_mInt32(double_resize_threshold);
// The maximum low water mark of the system `/proc/meminfo/MemAvailable`, Unit
byte, default 6.4G,
-// actual low water mark=min(6.4G, MemTotal * 10%), avoid wasting too much
memory on machines
-// with large memory larger than 64G.
-// Turn up max. On machines with more than 64G memory, more memory buffers
will be reserved for Full GC.
+// actual low water mark=min(6.4G, MemTotal * 5%), avoid wasting too much
memory on machines
+// with large memory larger than 128G.
+// Turn up max. On machines with more than 128G memory, more memory buffers
will be reserved for Full GC.
// Turn down max. will use as much memory as possible.
DECLARE_Int64(max_sys_mem_available_low_water_mark_bytes);
diff --git a/be/src/util/mem_info.cpp b/be/src/util/mem_info.cpp
index 57e48e947ff..b6f35df5d9c 100644
--- a/be/src/util/mem_info.cpp
+++ b/be/src/util/mem_info.cpp
@@ -304,7 +304,7 @@ void MemInfo::init() {
// upper sys_mem_available_low_water_mark, avoid wasting too much
memory.
_s_sys_mem_available_low_water_mark = std::max<int64_t>(
std::min<int64_t>(std::min<int64_t>(_s_physical_mem -
_s_mem_limit,
- int64_t(_s_physical_mem *
0.1)),
+ int64_t(_s_physical_mem *
0.05)),
config::max_sys_mem_available_low_water_mark_bytes),
0);
_s_sys_mem_available_warning_water_mark =
_s_sys_mem_available_low_water_mark * 2;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]