diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java index f4b378bae3b..7f73b81f65d 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java @@ -27,6 +27,7 @@ import javax.net.ssl.SSLEngine; +import io.netty.buffer.PooledByteBufAllocator; import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.common.allocator.LeakDetectionPolicy; @@ -1060,7 +1061,7 @@ public T setAllocatorPoolingPolicy(PoolingPolicy poolingPolicy) { * @return the configured pooling concurrency for the allocator. */ public int getAllocatorPoolingConcurrency() { - return this.getInteger(ALLOCATOR_POOLING_CONCURRENCY, 2 * Runtime.getRuntime().availableProcessors()); + return this.getInteger(ALLOCATOR_POOLING_CONCURRENCY, PooledByteBufAllocator.defaultNumDirectArena()); } /**