You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2022/05/20 11:49:04 UTC

[pulsar] 09/12: [Improve][doc] Add config of IO and acceptor threads in proxy (#15340)

This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 29104a70fae20b0a7ae288b274a8ebe22c7aa0ec
Author: Kai Wang <kw...@streamnative.io>
AuthorDate: Fri May 6 21:40:51 2022 +0800

    [Improve][doc] Add config of IO and acceptor threads in proxy (#15340)
    
    * Add config of IO and acceptor threads in proxy
    
    * Update doc
    
    * Update site2/docs/reference-configuration.md
    
    Co-authored-by: Anonymitaet <50...@users.noreply.github.com>
    
    * Update site2/docs/reference-configuration.md
    
    Co-authored-by: Anonymitaet <50...@users.noreply.github.com>
    (cherry picked from commit da3f017240662fe9498dcc3d0f8513c02a740bb8)
---
 conf/proxy.conf                                                     | 6 ++++++
 .../java/org/apache/pulsar/proxy/server/ProxyConfiguration.java     | 4 ++--
 site2/docs/reference-configuration.md                               | 2 ++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/conf/proxy.conf b/conf/proxy.conf
index c70b5939018..e5088b2742c 100644
--- a/conf/proxy.conf
+++ b/conf/proxy.conf
@@ -68,6 +68,12 @@ webServicePort=8080
 # Port to use to server HTTPS request
 webServicePortTls=
 
+# Number of threads used for Netty IO. Default is set to `2 * Runtime.getRuntime().availableProcessors()`
+numIOThreads=
+
+# Number of threads used for Netty Acceptor. Default is set to `1`
+numAcceptorThreads=
+
 ### --- TLS config variables --- ###
 ## Note that some of the above TLS configs also apply to the KeyStore TLS configuration.
 
diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java
index b08fea282cb..74e4808672f 100644
--- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java
+++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConfiguration.java
@@ -559,14 +559,14 @@ public class ProxyConfiguration implements PulsarConfiguration {
 
     @FieldContext(
             category = CATEGORY_SERVER,
-            doc = "Number of threads to use for Netty IO."
+            doc = "Number of threads used for Netty IO."
                     + " Default is set to `2 * Runtime.getRuntime().availableProcessors()`"
     )
     private int numIOThreads = 2 * Runtime.getRuntime().availableProcessors();
 
     @FieldContext(
             category = CATEGORY_SERVER,
-            doc = "Number of threads to use for Netty Acceptor."
+            doc = "Number of threads used for Netty Acceptor."
                     + " Default is set to `1`"
     )
     private int numAcceptorThreads = 1;
diff --git a/site2/docs/reference-configuration.md b/site2/docs/reference-configuration.md
index 0e7956367f5..9f4326a5598 100644
--- a/site2/docs/reference-configuration.md
+++ b/site2/docs/reference-configuration.md
@@ -755,6 +755,8 @@ The [Pulsar proxy](concepts-architecture-overview.md#pulsar-proxy) can be config
 | tokenAudience | The token audience stands for this broker. The field `tokenAudienceClaim` of a valid token need contains this parameter.| |
 | proxyLogLevel | Set the Pulsar Proxy log level. <li> If the value is set to 0, no TCP channel information is logged. <li> If the value is set to 1, only the TCP channel information and command information (without message body) are parsed and logged. <li> If the value is set to 2, all TCP channel information, command information, and message body are parsed and logged. | 0 |
 |haProxyProtocolEnabled | Enable or disable the [HAProxy](http://www.haproxy.org/) protocol. |false|
+| numIOThreads | Number of threads used for Netty IO. | 2 * Runtime.getRuntime().availableProcessors() |
+| numAcceptorThreads | Number of threads used for Netty Acceptor. | 1 |
 
 ## ZooKeeper