wangbo commented on code in PR #54243:
URL: https://github.com/apache/doris/pull/54243#discussion_r2253937087
##########
be/src/agent/cgroup_cpu_ctl.cpp:
##########
@@ -404,13 +419,14 @@ Status CgroupV2CpuCtl::init() {
}
Status CgroupV2CpuCtl::modify_cg_cpu_hard_limit_no_lock(int cpu_hard_limit) {
- if (cpu_hard_limit <= 0) {
- return Status::InternalError<false>("cpu hard limit must be greater
than 0");
- }
- std::string value = "";
- uint64_t int_val = _cpu_cfs_period_us * _cpu_core_num * cpu_hard_limit /
100;
- value = std::to_string(int_val) + " 100000";
- std::string msg = "modify cpu.max to [" + value + "]";
+ // If cpu_hard_limit is 0, we set the cpu.max to 1000 100000.
Review Comment:
set cgroup's cpu limit default value 'max 100000' when input value is 0 or
invalid value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]