xinyiZzz commented on code in PR #47462: URL: https://github.com/apache/doris/pull/47462#discussion_r1964990742
########## be/src/common/daemon.cpp: ########## @@ -547,7 +550,9 @@ void Daemon::cache_adjust_capacity_thread() { doris::GlobalMemoryArbitrator::cache_adjust_capacity_cv.wait_for( l, std::chrono::milliseconds(100)); } - double adjust_weighted = GlobalMemoryArbitrator::last_cache_capacity_adjust_weighted; + double adjust_weighted = std::min<double>( + GlobalMemoryArbitrator::last_cache_capacity_adjust_weighted, + GlobalMemoryArbitrator::last_wg_trigger_cache_capacity_adjust_weighted); Review Comment: 为什么要引入 last_wg_trigger_cache_capacity_adjust_weighted 和 last_affected_cache_capacity_adjust_weighted 呢。 看 workload_group_manager.cpp 中的描述,这套逻辑是为了在 workload group 没有超限,但进程内存不足时触发cache的容量缩减,但目前已有的逻辑会在进程内存到达 56% 的时候就开始逐步缩减cache,所以是因为已有逻辑缩减cache不够快么? 目前这样写很绕,倒不如修改 refresh_cache_capacity 这个方法实现 -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org