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


##########
common/src/main/java/org/apache/celeborn/common/network/util/NettyUtils.java:
##########
@@ -143,15 +143,25 @@ public static synchronized PooledByteBufAllocator 
getSharedPooledByteBufAllocato
 
   public static PooledByteBufAllocator getPooledByteBufAllocator(
       TransportConf conf, AbstractSource source, boolean allowCache) {
+    return getPooledByteBufAllocator(conf, source, allowCache, 0);
+  }
+
+  public static PooledByteBufAllocator getPooledByteBufAllocator(
+      TransportConf conf, AbstractSource source, boolean allowCache, int 
coreNum) {
     if (conf.getCelebornConf().networkShareMemoryAllocator()) {
       return getSharedPooledByteBufAllocator(
           conf.getCelebornConf(),
           source,
           allowCache && 
conf.getCelebornConf().networkMemoryAllocatorAllowCache());
     }
+    int arenas;
+    if (coreNum != 0) {
+      arenas = coreNum;
+    } else {
+      arenas = conf.getCelebornConf().networkAllocatorArenas();

Review Comment:
   Should we limit this max value in 
`conf.getCelebornConf().networkAllocatorArenas()` or just in this un-shared 
pool memory allocator case?



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