ptlrs commented on code in PR #10133:
URL: https://github.com/apache/ozone/pull/10133#discussion_r3352622504


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/OzoneManagerServiceProviderImpl.java:
##########
@@ -229,7 +229,7 @@ public OzoneManagerServiceProviderImpl(
         new ThreadFactoryBuilder().setNameFormat(threadNamePrefix + 
"SyncOM-%d")
             .build();
     // Number of parallel workers
-    int omDBTarProcessorThreadCount = Math.max(64, 
Runtime.getRuntime().availableProcessors());
+    int omDBTarProcessorThreadCount = Math.min(64, 
Runtime.getRuntime().availableProcessors());

Review Comment:
   We want at most 64 threads. 
   
   Previously, due to the way the threadpool was configured, we were 
effectively using a single threadpool executor. `omDBTarProcessorThreadCount` 
was used as `threadPoolSize`.
   ```java
         this.executor =
             new ThreadPoolExecutor(0, threadPoolSize, 60L, TimeUnit.SECONDS, 
new LinkedBlockingQueue<>(), threadFactory);
   ```
   
   Now that the bug has been fixed as part of this PR and the new executors are 
going to be actually multithreaded, we are deciding to cap the number of 
threads to 64. 
   
   See previous discussion in 
https://github.com/apache/ozone/pull/10133#discussion_r3151790350



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to