xy720 commented on code in PR #46959:
URL: https://github.com/apache/doris/pull/46959#discussion_r1916199106


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/TabletStatMgr.java:
##########
@@ -43,12 +43,24 @@
 public class TabletStatMgr extends MasterDaemon {
     private static final Logger LOG = 
LogManager.getLogger(TabletStatMgr.class);
 
-    private ForkJoinPool taskPool = new 
ForkJoinPool(Runtime.getRuntime().availableProcessors());
+    private ForkJoinPool taskPool = new ForkJoinPool(Math.max(8, 
Runtime.getRuntime().availableProcessors()));
 
     public TabletStatMgr() {
         super("tablet stat mgr", Config.tablet_stat_update_interval_second * 
1000);
     }
 
+    private ForkJoinPool adjustThreadPool(int backendSize) {
+        int minimunParallelism = Math.max(8, 
Runtime.getRuntime().availableProcessors());
+        int maximunParallelism = 64;
+        int newParallelism = Math.min(backendSize, maximunParallelism);
+        newParallelism = Math.max(newParallelism, minimunParallelism);
+        newParallelism = (newParallelism + 7) / 8 * 8; // Round up to the 
multiple of 8
+        if (taskPool == null || taskPool.getParallelism() != newParallelism) {
+            return new ForkJoinPool(newParallelism);

Review Comment:
   Using a regular thread pool here is sufficient, I replaced the forkjoinpool 
with a thread pool.



-- 
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

Reply via email to