[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17812352#comment-17812352
 ] 

Christopher Tubbs commented on ZOOKEEPER-4797:
----------------------------------------------

I don't see this property as particularly special over other JVM flags. The 
only thing that makes Xmx special is how common it is. The percentage option is 
not nearly as common. It doesn't make sense to add an option for every little 
thing users might set. Instead, it'd be better to make it simple and easy for 
users to set anything they want. Also, there's value in keeping this config 
file simple, so it can be easily edited by anybody who needs to do something 
unique, rather than bake in complexity to handle a variety of scenarios.

See my suggestion in 
https://github.com/apache/zookeeper/pull/2120#pullrequestreview-1851494424

> Allow for -XX:MaxRAMPercentage JVM setting
> ------------------------------------------
>
>                 Key: ZOOKEEPER-4797
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4797
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: scripts
>            Reporter: Frederiko Costa
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> When running Zk in a containerized environment, it's sometimes desirable to 
> express your heap size in terms of percentage of available memory allocated 
> to a container.
> As it stands, zkEnv.sh forces your to haveĀ  -Xmx, which defaults to 1GB. Some 
> environments wanted to set it to more, mostly related to the amount of Ram.
> This is a request to implement the option of using -XX:MaxRamPercentage 
> option when starting zookeeper.
> Suggested implementation is to also make a variable 
> ZK_SERVER_MAXRAMPERCENTAGE available to be added to SERVER_JVMFLAGS. If the 
> variable is set, ZK_HEAP_SERVER is ignored, if no ZK_SERVER_MAXRAMPERCENTAGE, 
> ZK_SERVER_HEAP is set as usual.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to