You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Kezhu Wang (Jira)" <ji...@apache.org> on 2026/10/20 10:21:00 UTC
[jira] [Resolved] (ZOOKEEPER-4391) Unable to use newer JVM memory settings as Xmx overrides
[ https://issues.apache.org/jira/browse/ZOOKEEPER-4391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kezhu Wang resolved ZOOKEEPER-4391.
-----------------------------------
Fix Version/s: 3.10.0
Resolution: Fixed
Issue resolved by pull request 2460
[https://github.com/apache/zookeeper/pull/2460]
> Unable to use newer JVM memory settings as Xmx overrides
> --------------------------------------------------------
>
> Key: ZOOKEEPER-4391
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4391
> Project: ZooKeeper
> Issue Type: Improvement
> Components: scripts
> Reporter: Daniel Kimsey
> Assignee: Justin Prieto
> Priority: Trivial
> Labels: pull-request-available
> Fix For: 3.10.0
>
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> The Zookeeper environment initialization scripts [forcibly|https://gitbox.apache.org/repos/asf?p=zookeeper.git;a=blob;f=bin/zkEnv.sh;h=8d93a50c7c0cedee6a23746362e7b6fff96ad61c;hb=refs/heads/master#l144] set an {{Xmx}} setting. This is an issue for more flexible configuration JVM memory options like ({{MaxRAMPercentage}} and {{InitialRAMPercentage}}) as Xmx overrides them.
> Ideally, if SERVER_JVMFLAGS/CLIENT_JVMFLAGS are set, we should not attempt to modify them as the operator has decided what flags to set. However, this would be a behavior change, I don't know if the project is interested/willing to do that. Alternatively, we add a flag to disable the default (current) behavior.
> {code:sh}
> # default heap for zookeeper server
> if [ "$ZK_SKIP_XMX" != "yes" ];
> ZK_SERVER_HEAP="${ZK_SERVER_HEAP:-1000}"
> export SERVER_JVMFLAGS="-Xmx${ZK_SERVER_HEAP}m $SERVER_JVMFLAGS"
> fi
> {code}
> Repeat for CLIENT_JVMFLAGS.
> Thank you
--
This message was sent by Atlassian Jira
(v8.20.10#820010)