You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2025/09/04 14:57:53 UTC
[PR] Replace G1GC with generational ZGC and simplify PULSAR_GC options in values.yaml [pulsar-helm-chart]
lhotari opened a new pull request, #626:
URL: https://github.com/apache/pulsar-helm-chart/pull/626
(no comment)
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Replace G1GC with generational ZGC and simplify PULSAR_GC options in values.yaml [pulsar-helm-chart]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #626:
URL: https://github.com/apache/pulsar-helm-chart/pull/626#issuecomment-3259324975
To get the best performance in Linux with ZGC, it's necessary to also tune the Linux kernel with these settings recommended in a Netflix blog post:
```
echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
echo advise | sudo tee /sys/kernel/mm/transparent_hugepage/shmem_enabled
echo defer | sudo tee /sys/kernel/mm/transparent_hugepage/defrag
echo 1 | sudo tee /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
```
For example in Ubuntu, you can make these settings permanent in this way:
```
sudo apt-get -y install sysfsutils
# Tune Linux Transparent HugePages (THP) for Java processes in a persistent way with sysfsutils
cat <<EOF | sudo tee /etc/sysfs.d/transparent_hugepage.conf
# Based on Netflix instructions from https://netflixtechblog.com/bending-pause-times-to-your-will-with-generational-zgc-256629c9386b
# ZGC won't be able to make use of THP with -XX:+UseTransparentHugePages unless these settings are used
kernel/mm/transparent_hugepage/enabled=madvise
kernel/mm/transparent_hugepage/shmem_enabled=advise
kernel/mm/transparent_hugepage/defrag=defer
kernel/mm/transparent_hugepage/khugepaged/defrag=1
EOF
sudo systemctl enable sysfsutils.service
sudo systemctl restart sysfsutils.service
```
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Replace G1GC with generational ZGC and simplify PULSAR_GC options in values.yaml [pulsar-helm-chart]
Posted by "thomas-bousquet (via GitHub)" <gi...@apache.org>.
thomas-bousquet commented on code in PR #626:
URL: https://github.com/apache/pulsar-helm-chart/pull/626#discussion_r2389468185
##########
.ci/clusters/values-pulsar-previous-lts.yaml:
##########
@@ -17,4 +17,45 @@
# under the License.
#
-defaultPulsarImageTag: 3.0.13
\ No newline at end of file
+defaultPulsarImageTag: 3.0.13
+
+# Pulsar 3.0.x runs on JDK 17, which doesn't support -XX:+ZGeneration, therefore it's necessary to
+# override the PULSAR_GC options to use ZGC.
+
+zookeeper:
+ configData:
+ PULSAR_GC: >
+ -XX:+UseZGC
+ -XX:+AlwaysPreTouch
+ -XX:+UseTransparentHugePages
+ -XX:+ExitOnOutOfMemoryError
+ -XX:+DisableExplicitGC
+ -XX:+PerfDisableSharedMem
+bookkeeper:
+ configData:
+ PULSAR_GC: >
+ -XX:+UseZGC
+ -XX:+AlwaysPreTouch
+ -XX:+UseTransparentHugePages
+ -XX:+ExitOnOutOfMemoryError
+ -XX:+DisableExplicitGC
+ -XX:+PerfDisableSharedMem
+broker:
+ configData:
+ PULSAR_GC: >
+ -XX:+UseZGC
+ -XX:+AlwaysPreTouch
+ -XX:+UseTransparentHugePages
+ -XX:+ExitOnOutOfMemoryError
+ -XX:+DisableExplicitGC
+ -XX:+PerfDisableSharedMem
+
+proxy:
Review Comment:
Thank you for the explanation.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Replace G1GC with generational ZGC and simplify PULSAR_GC options in values.yaml [pulsar-helm-chart]
Posted by "thomas-bousquet (via GitHub)" <gi...@apache.org>.
thomas-bousquet commented on code in PR #626:
URL: https://github.com/apache/pulsar-helm-chart/pull/626#discussion_r2388600334
##########
.ci/clusters/values-pulsar-previous-lts.yaml:
##########
@@ -17,4 +17,45 @@
# under the License.
#
-defaultPulsarImageTag: 3.0.13
\ No newline at end of file
+defaultPulsarImageTag: 3.0.13
+
+# Pulsar 3.0.x runs on JDK 17, which doesn't support -XX:+ZGeneration, therefore it's necessary to
+# override the PULSAR_GC options to use ZGC.
+
+zookeeper:
+ configData:
+ PULSAR_GC: >
+ -XX:+UseZGC
+ -XX:+AlwaysPreTouch
+ -XX:+UseTransparentHugePages
+ -XX:+ExitOnOutOfMemoryError
+ -XX:+DisableExplicitGC
+ -XX:+PerfDisableSharedMem
+bookkeeper:
+ configData:
+ PULSAR_GC: >
+ -XX:+UseZGC
+ -XX:+AlwaysPreTouch
+ -XX:+UseTransparentHugePages
+ -XX:+ExitOnOutOfMemoryError
+ -XX:+DisableExplicitGC
+ -XX:+PerfDisableSharedMem
+broker:
+ configData:
+ PULSAR_GC: >
+ -XX:+UseZGC
+ -XX:+AlwaysPreTouch
+ -XX:+UseTransparentHugePages
+ -XX:+ExitOnOutOfMemoryError
+ -XX:+DisableExplicitGC
+ -XX:+PerfDisableSharedMem
+
+proxy:
Review Comment:
Does `autorecovery` need some of these changes as well?
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Replace G1GC with generational ZGC and simplify PULSAR_GC options in values.yaml [pulsar-helm-chart]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on code in PR #626:
URL: https://github.com/apache/pulsar-helm-chart/pull/626#discussion_r2389453918
##########
.ci/clusters/values-pulsar-previous-lts.yaml:
##########
@@ -17,4 +17,45 @@
# under the License.
#
-defaultPulsarImageTag: 3.0.13
\ No newline at end of file
+defaultPulsarImageTag: 3.0.13
+
+# Pulsar 3.0.x runs on JDK 17, which doesn't support -XX:+ZGeneration, therefore it's necessary to
+# override the PULSAR_GC options to use ZGC.
+
+zookeeper:
+ configData:
+ PULSAR_GC: >
+ -XX:+UseZGC
+ -XX:+AlwaysPreTouch
+ -XX:+UseTransparentHugePages
+ -XX:+ExitOnOutOfMemoryError
+ -XX:+DisableExplicitGC
+ -XX:+PerfDisableSharedMem
+bookkeeper:
+ configData:
+ PULSAR_GC: >
+ -XX:+UseZGC
+ -XX:+AlwaysPreTouch
+ -XX:+UseTransparentHugePages
+ -XX:+ExitOnOutOfMemoryError
+ -XX:+DisableExplicitGC
+ -XX:+PerfDisableSharedMem
+broker:
+ configData:
+ PULSAR_GC: >
+ -XX:+UseZGC
+ -XX:+AlwaysPreTouch
+ -XX:+UseTransparentHugePages
+ -XX:+ExitOnOutOfMemoryError
+ -XX:+DisableExplicitGC
+ -XX:+PerfDisableSharedMem
+
+proxy:
Review Comment:
@thomas-bousquet yes.
The context of this file is to set values which work with Java 17 in CI.
autorecovery is disabled for CI:
https://github.com/apache/pulsar-helm-chart/blob/e9f7f1d2285e2795961bc6a9b18dfc12c9ef9c85/.ci/values-common.yaml#L57
For Java 21, you'd need to also want to set `-XX:+ZGenerational`.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Replace G1GC with generational ZGC and simplify PULSAR_GC options in values.yaml [pulsar-helm-chart]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #626:
URL: https://github.com/apache/pulsar-helm-chart/pull/626
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org