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

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

commit 702e5bed72886f09ba3ac66ac5c114526fd43414
Author: liyuntao <[email protected]>
AuthorDate: Mon Feb 17 18:41:06 2020 +0800

    explicit statement env 'BOOKIE_MEM' and 'BOOKIE_GC' for values-mini.yaml 
(#6340)
    
    Fixes #6338
    
    ### Motivation
    This commit started while I was using helm in my local minikube, noticed 
that there's a mismatch between `values-mini.yaml` and `values.yaml` files. At 
first I thought it was a copy/paste error. So I created #6338;
    
    Then I looked into the details how these env-vars[ were 
used](https://github.com/apache/pulsar/blob/28875d5abc4cd13a3e9cc4f59524d2566d9f9f05/conf/bkenv.sh#L36),
 found out its ok to use `PULSAR_MEM` as an alternative. But it introduce 
problems:
    1. Since `BOOKIE_GC` was not defined , the default 
[BOOKIE_EXTRA_OPTS](https://github.com/apache/pulsar/blob/28875d5abc4cd13a3e9cc4f59524d2566d9f9f05/conf/bkenv.sh#L39)
  will finally use default value of `BOOKIE_GC`, thus would cover same the JVM 
parameters defined prior in `PULSAR_MEM`.
    2. May cause problems when bootstrap scripts changed in later dev, better 
to make it explicitly.
    
    So I create this pr to solve above problems(hidden trouble).
    
    ### Modifications
    
    As mentioned above, I've made such modifications below:
    1. make `BOOKIE_MEM` and `BOOKIE_GC` explicit in `values-mini.yaml` file.  
Keep up with the format in`values.yaml` file.
    2. remove all  print-gc-logs related args. Considering the resource 
constraints of minikube environment. The removed part's content is 
`-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime 
-XX:+PrintHeapAtGC -verbosegc -XX:G1LogLevel=finest`
    3. leave `PULSAR_PREFIX_dbStorage_rocksDB_blockCacheSize` empty as usual, 
as 
[conf/standalone.conf#L576](https://github.com/apache/pulsar/blob/df152109415f2b10dd83e8afe50d9db7ab7cbad5/conf/standalone.conf#L576)
 says it would to use 10% of the direct memory size by default.
---
 deployment/kubernetes/helm/pulsar/values-mini.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/deployment/kubernetes/helm/pulsar/values-mini.yaml 
b/deployment/kubernetes/helm/pulsar/values-mini.yaml
index 207b4cd..fa23cc9 100644
--- a/deployment/kubernetes/helm/pulsar/values-mini.yaml
+++ b/deployment/kubernetes/helm/pulsar/values-mini.yaml
@@ -146,7 +146,8 @@ bookkeeper:
   ## templates/bookkeeper-configmap.yaml
   ##
   configData:
-    PULSAR_MEM: "\"-Xms128m -Xmx256m -XX:MaxDirectMemorySize=128m 
-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 [...]
+    BOOKIE_MEM: "\"-Xms128m -Xmx256m -XX:MaxDirectMemorySize=128m 
-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\""
+    BOOKIE_GC: "\"-XX:+UseG1GC -XX:MaxGCPauseMillis=10\""
     PULSAR_PREFIX_dbStorage_writeCacheMaxSizeMb: "32"
     PULSAR_PREFIX_dbStorage_readAheadCacheMaxSizeMb: "32"
     PULSAR_PREFIX_journalMaxSizeMB: "2048"

Reply via email to