diff --git a/code/common/service-discovery/java/nu/marginalia/service/client/GrpcChannelPoolFactory.java b/code/common/service-discovery/java/nu/marginalia/service/client/GrpcChannelPoolFactory.java index 08dbb41d..57e72fa6 100644 --- a/code/common/service-discovery/java/nu/marginalia/service/client/GrpcChannelPoolFactory.java +++ b/code/common/service-discovery/java/nu/marginalia/service/client/GrpcChannelPoolFactory.java @@ -21,9 +21,9 @@ public class GrpcChannelPoolFactory { private final NodeConfigurationWatcher nodeConfigurationWatcher; private final ServiceRegistryIf serviceRegistryIf; private static final Executor executor = NamedExecutorFactory.createFixed("gRPC-Channel-Pool", - Math.clamp(Runtime.getRuntime().availableProcessors() / 2, 2, 16)); + Math.clamp(Runtime.getRuntime().availableProcessors() / 2, 2, 32)); private static final Executor offloadExecutor = NamedExecutorFactory.createFixed("gRPC-Offload-Pool", - Math.clamp(Runtime.getRuntime().availableProcessors() / 2, 2, 16)); + Math.clamp(Runtime.getRuntime().availableProcessors() / 2, 2, 32)); @Inject public GrpcChannelPoolFactory(NodeConfigurationWatcher nodeConfigurationWatcher, diff --git a/code/common/service/java/nu/marginalia/service/server/Service.java b/code/common/service/java/nu/marginalia/service/server/Service.java index f4f51375..040e9258 100644 --- a/code/common/service/java/nu/marginalia/service/server/Service.java +++ b/code/common/service/java/nu/marginalia/service/server/Service.java @@ -137,7 +137,7 @@ public class Service { int port = params.serviceRegistry.requestPort(config.externalAddress(), new ServiceKey.Grpc<>("-", partition)); - int nThreads = Math.clamp(Runtime.getRuntime().availableProcessors() / 2, 2, 8); + int nThreads = Math.clamp(Runtime.getRuntime().availableProcessors() / 2, 2, 16); // Start the gRPC server var grpcServerBuilder = NettyServerBuilder.forAddress(new InetSocketAddress(config.bindAddress(), port))