zwangsheng commented on code in PR #2570:
URL: https://github.com/apache/celeborn/pull/2570#discussion_r1642071200


##########
common/src/main/java/org/apache/celeborn/common/network/util/NettyUtils.java:
##########
@@ -150,7 +150,8 @@ public static PooledByteBufAllocator 
getPooledByteBufAllocator(
           allowCache && 
conf.getCelebornConf().networkMemoryAllocatorAllowCache());
     }
     PooledByteBufAllocator allocator =
-        createPooledByteBufAllocator(conf.preferDirectBufs(), allowCache, 
conf.clientThreads());
+        createPooledByteBufAllocator(
+            conf.preferDirectBufs(), allowCache, 
conf.getCelebornConf().networkAllocatorArenas());

Review Comment:
   According to this code, zero will be turn into core nums, which is 
`conf.getCelebornConf().networkAllocatorArenas()` default value for now.
   ```
     private static PooledByteBufAllocator createPooledByteBufAllocator(
         boolean allowDirectBufs, boolean allowCache, int numCores) {
       if (numCores == 0) {
         numCores = Runtime.getRuntime().availableProcessors();
       }
       return new PooledByteBufAllocator(
           allowDirectBufs && PlatformDependent.directBufferPreferred(),
           Math.min(PooledByteBufAllocator.defaultNumHeapArena(), numCores),
           Math.min(PooledByteBufAllocator.defaultNumDirectArena(), 
allowDirectBufs ? numCores : 0),
           PooledByteBufAllocator.defaultPageSize(),
           PooledByteBufAllocator.defaultMaxOrder(),
           allowCache ? PooledByteBufAllocator.defaultSmallCacheSize() : 0,
           allowCache ? PooledByteBufAllocator.defaultNormalCacheSize() : 0,
           allowCache && PooledByteBufAllocator.defaultUseCacheForAllThreads());
     }
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to