Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
zhannngchen authored and dataroaring committed Sep 22, 2022
1 parent 58f3e98 commit d672860
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion be/src/common/config.h
Expand Up @@ -525,7 +525,7 @@ CONF_Int32(load_process_max_memory_limit_percent, "50"); // 50%
// soft limit which can trigger the memtable flush for the load channel who
// consumes lagest memory size before we reach the hard limit. The soft limit
// might avoid all load jobs hang at the same time.
CONF_Int32(load_process_soft_limit_percent, "50");
CONF_Int32(load_process_soft_mem_limit_percent, "50");

// result buffer cancelled time (unit: second)
CONF_mInt32(result_buffer_cancelled_interval_time, "300");
Expand Down
3 changes: 2 additions & 1 deletion be/src/runtime/load_channel_mgr.cpp
Expand Up @@ -69,7 +69,8 @@ LoadChannelMgr::~LoadChannelMgr() {

Status LoadChannelMgr::init(int64_t process_mem_limit) {
int64_t load_mgr_mem_limit = calc_process_max_load_memory(process_mem_limit);
_load_process_soft_limit = load_mgr_mem_limit * config::load_process_soft_limit_percent / 100;
_load_process_soft_mem_limit =
load_mgr_mem_limit * config::load_process_soft_mem_limit_percent / 100;
_mem_tracker = std::make_shared<MemTrackerLimiter>(load_mgr_mem_limit, "LoadChannelMgr");
REGISTER_HOOK_METRIC(load_channel_mem_consumption,
[this]() { return _mem_tracker->consumption(); });
Expand Down
7 changes: 4 additions & 3 deletions be/src/runtime/load_channel_mgr.h
Expand Up @@ -82,7 +82,7 @@ class LoadChannelMgr {

// check the total load channel mem consumption of this Backend
std::shared_ptr<MemTrackerLimiter> _mem_tracker;
int64_t _load_process_soft_limit = -1;
int64_t _load_process_soft_mem_limit = -1;

// If hard limit reached, one thread will trigger load channel flush,
// other threads should wait on the condition variable.
Expand Down Expand Up @@ -153,7 +153,8 @@ template <typename TabletWriterAddResult>
Status LoadChannelMgr::_handle_mem_exceed_limit(TabletWriterAddResult* response) {
_try_to_wait_flushing();
// Check the soft limit.
if (_mem_tracker->consumption() < _load_process_soft_limit) {
DCHECK(_load_process_soft_mem_limit > 0);
if (_mem_tracker->consumption() < _load_process_soft_mem_limit) {
return Status::OK();
}
// Pick load channel to reduce memory.
Expand Down Expand Up @@ -197,7 +198,7 @@ Status LoadChannelMgr::_handle_mem_exceed_limit(TabletWriterAddResult* response)
_should_wait_flush = true;
oss << " hard limit: " << _mem_tracker->limit();
} else {
oss << " soft limit: " << _load_process_soft_limit;
oss << " soft limit: " << _load_process_soft_mem_limit;
}
LOG(INFO) << oss.str();
}
Expand Down
10 changes: 8 additions & 2 deletions docs/en/docs/admin-manual/config/be-config.md
Expand Up @@ -706,12 +706,18 @@ Set these default values very large, because we don't want to affect load perfor

### `load_process_max_memory_limit_percent`

Default: 80 (%)
Default: 50 (%)

The percentage of the upper memory limit occupied by all imported threads on a single node, the default is 80%
The percentage of the upper memory limit occupied by all imported threads on a single node, the default is 50%

Set these default values very large, because we don't want to affect load performance when users upgrade Doris. If necessary, the user should set these configurations correctly

### `load_process_soft_mem_limit_percent`

Default: 50 (%)

The soft limit refers to the proportion of the load memory limit of a single node. For example, the load memory limit for all load tasks is 20GB, and the soft limit defaults to 50% of this value, that is, 10GB. When the load memory usage exceeds the soft limit, the job with the largest memory consuption will be selected to be flushed to release the memory space, the default is 50%

### `log_buffer_level`

Default: empty
Expand Down
10 changes: 8 additions & 2 deletions docs/zh-CN/docs/admin-manual/config/be-config.md
Expand Up @@ -707,12 +707,18 @@ load错误日志将在此时间后删除

### `load_process_max_memory_limit_percent`

默认值:80
默认值:50

单节点上所有的导入线程占据的内存上限比例,默认80%
单节点上所有的导入线程占据的内存上限比例,默认50%

将这些默认值设置得很大,因为我们不想在用户升级 Doris 时影响负载性能。 如有必要,用户应正确设置这些配置。

### `load_process_soft_mem_limit_percent`

默认值:50

soft limit是指站单节点导入内存上限的比例。例如所有导入任务导入的内存上限是20GB,则soft limit默认为该值的50%,即10GB。导入内存占用超过soft limit时,会挑选占用内存最大的作业进行下刷以提前释放内存空间,默认50%

### `log_buffer_level`

默认值:空
Expand Down

0 comments on commit d672860

Please sign in to comment.