lhotari commented on a change in pull request #13839:
URL: https://github.com/apache/pulsar/pull/13839#discussion_r787952270



##########
File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
##########
@@ -245,6 +245,13 @@
     )
     private int numIOThreads = 2 * Runtime.getRuntime().availableProcessors();
 
+    @FieldContext(
+            category = CATEGORY_SERVER,
+            doc = "Number of shared threads to use for broker clients."
+                    + " Default is set to `2 * 
Runtime.getRuntime().availableProcessors()`"
+    )
+    private int brokerClientNumIOThreads = 2 * 
Runtime.getRuntime().availableProcessors();

Review comment:
       The problem is that broker IO threads is a `EventLoopGroup` instance 
which is already used in the Pulsar Client.
   
   
https://github.com/apache/pulsar/blob/9032a9afc15e029d8f205761b5e104f44f9c4be0/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L319-L320
   
   The Pulsar Client has this internal/IO and external/listener executors in 
addition to the `eventLoopGroup`.
   
   
https://github.com/apache/pulsar/blob/4591a210a8d924d99811edfdfeb7433452e5eeb4/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java#L182-L185
   
   It might be a risky change in Pulsar Client to replace the internal executor 
to delegate directly to `eventLoopGroup`.
   
   This is the reason why I think it's necessary to have a separate setting to 
control the amount of threads used to run the Pulsar Client internal executors. 
Before this PR each client has had a single threaded internal executor for each 
client instance.




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