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 15:05:56 UTC
[pulsar] 14/31: [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.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 32f123c4beba1906fdd398c149063c8ee1387e30
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 cdaf0ff732f..9f83278d7a0 100644
--- a/conf/proxy.conf
+++ b/conf/proxy.conf
@@ -71,6 +71,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 2c8204bc231..5a412dff65c 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
@@ -615,14 +615,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 b1ac376fd8b..4ca94c5a65f 100644
--- a/site2/docs/reference-configuration.md
+++ b/site2/docs/reference-configuration.md
@@ -800,6 +800,8 @@ The [Pulsar proxy](concepts-architecture-overview.md#pulsar-proxy) can be config
|tokenAudienceClaim| The token audience "claim" name, e.g. "aud". It is used to get the audience from token. If it is not set, the audience is not verified. ||
| tokenAudience | The token audience stands for this broker. The field `tokenAudienceClaim` of a valid token need contains this parameter.| |
|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 |
#### Deprecated parameters of Pulsar proxy
The following parameters have been deprecated in the `conf/proxy.conf` file.