You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2020/04/21 05:57:01 UTC
[pulsar-helm-chart] 22/34: [ISSUE-6131]: Ensure JVM memory and GC
options are set for bookie (#6201)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git
commit ef099c96d2feabfbfbe58d8a90175ed6497bf16f
Author: roman-popenov <58...@users.noreply.github.com>
AuthorDate: Fri Feb 7 20:15:53 2020 -0500
[ISSUE-6131]: Ensure JVM memory and GC options are set for bookie (#6201)
### Motivation
Fixes #6131 (caused by #5675):
When upgrading an existing 2.4.1 bookie cluster to 2.5.0 on kubernetes, the bookie fails to start with the following exception during initialization: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 2147483648, max: 2147483648). This is caused by the fact that the bookie environment variables `BOOKIE_MEM` and `BOOKIE_FC` defined in conf/bkenv.sh has no effect, and it is always using the defaults values.
#### Proposed solution:
Set `BOOKIE_MEM` and `BOOKIE_GC` in the helm deployments charts and default to `PULSAR_MEM` if the `BOOKIE` settings are not set and then use the default settings if none of those environment variables are set.
#### Changes made
Helm chart deployment `values.yaml` and `values-mini.yaml` along with the `bkenv.sh` configuration script.
### Documentation
Currently, the documentation explaining the deployment process and how to change settings is lacking and need to be updated.
---
pulsar/templates/bookkeeper-statefulset.yaml | 1 +
pulsar/values.yaml | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/pulsar/templates/bookkeeper-statefulset.yaml b/pulsar/templates/bookkeeper-statefulset.yaml
index eb2597d..012eb4e 100644
--- a/pulsar/templates/bookkeeper-statefulset.yaml
+++ b/pulsar/templates/bookkeeper-statefulset.yaml
@@ -115,6 +115,7 @@ spec:
- >
bin/apply-config-from-env.py conf/bookkeeper.conf &&
bin/apply-config-from-env.py conf/pulsar_env.sh &&
+ bin/apply-config-from-env.py conf/bkenv.sh &&
bin/pulsar bookie
ports:
- name: client
diff --git a/pulsar/values.yaml b/pulsar/values.yaml
index d4f7a63..ab9aef9 100644
--- a/pulsar/values.yaml
+++ b/pulsar/values.yaml
@@ -179,7 +179,8 @@ bookkeeper:
## templates/bookkeeper-configmap.yaml
##
configData:
- PULSAR_MEM: "\"-Xms15g -Xmx15g -XX:MaxDirectMemorySize=15g -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+P [...]
+ BOOKIE_MEM: "\"-Xms15g -Xmx15g -XX:MaxDirectMemorySize=15g -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+Pri [...]
+ BOOKIE_GC: "\"-XX:+UseG1GC -XX:MaxGCPauseMillis=10\""
PULSAR_PREFIX_dbStorage_writeCacheMaxSizeMb: "2048"
PULSAR_PREFIX_dbStorage_readAheadCacheMaxSizeMb: "2048"
PULSAR_PREFIX_dbStorage_rocksDB_blockCacheSize: "268435456"