From 9ff75ec10835fdc32d138ffbacf6df4197ff4941 Mon Sep 17 00:00:00 2001 From: Dahai Date: Sat, 19 Aug 2023 07:10:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=BB=98=E8=AE=A4=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infrastructure/utils/ThreadPoolUtils.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dhorse-infrastructure/src/main/java/org/dhorse/infrastructure/utils/ThreadPoolUtils.java b/dhorse-infrastructure/src/main/java/org/dhorse/infrastructure/utils/ThreadPoolUtils.java index f450333d..804002fe 100644 --- a/dhorse-infrastructure/src/main/java/org/dhorse/infrastructure/utils/ThreadPoolUtils.java +++ b/dhorse-infrastructure/src/main/java/org/dhorse/infrastructure/utils/ThreadPoolUtils.java @@ -24,7 +24,7 @@ public class ThreadPoolUtils { private static final int CPU_SIZE_2 = 2 * CPU_SIZE; - private static final int CPU_SIZE_4 = 4 * CPU_SIZE; + private static final int CPU_SIZE_8 = 8 * CPU_SIZE; private static ThreadPoolExecutor THREAD_POOL_BUILD; @@ -50,10 +50,10 @@ public class ThreadPoolUtils { public static void initThreadPool() { ComponentConstants componentConstants = SpringBeanContext.getBean(ComponentConstants.class); - int buildCore = CPU_SIZE_2; - int buildMax = CPU_SIZE_4; - int deploymentCore = CPU_SIZE_2; - int deploymentMax = CPU_SIZE_4; + int buildCore = CPU_SIZE_8; + int buildMax = CPU_SIZE_8; + int deploymentCore = CPU_SIZE_8; + int deploymentMax = CPU_SIZE_8; if(componentConstants.getThreadPoolBuildCore() != null) { buildCore = componentConstants.getThreadPoolBuildCore(); } @@ -72,7 +72,7 @@ public static void initThreadPool() { buildMax, 5, TimeUnit.SECONDS, - new ArrayBlockingQueue(5), + new ArrayBlockingQueue(8), threadFactory("build-pool-%d")); THREAD_POOL_DEPLOYMENT = new ThreadPoolExecutor( @@ -80,7 +80,7 @@ public static void initThreadPool() { deploymentMax, 5, TimeUnit.SECONDS, - new ArrayBlockingQueue(5), + new ArrayBlockingQueue(8), threadFactory("deployment-pool-%d")); }