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

Arpit Gupta commented on ZOOKEEPER-1670:
----------------------------------------

[~enis]

The problem with zookeeper-env.sh is that people can replace the default 
configs. So i think the check should be in zkEnv.sh

However another problem exists where SERVER_JVMFLAGS is also used to set the 
jaas configuration file. I feel we need to introduce another variable called 
ZK_SERVER_HEAP which defaults to 1G and we set the 
SERVER_JVMFLAGS="$ZK_SERVER_HEAP $SERVER_JVMFLAGS"

That way any existing settings user do for heap size still works but will 
default to 1G if nothing is found.
                
> zookeeper should set a default value for SERVER_JVMFLAGS so that memory usage 
> is controlled
> -------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1670
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1670
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.5
>            Reporter: Arpit Gupta
>            Assignee: Arpit Gupta
>             Fix For: 3.4.6
>
>         Attachments: ZOOKEEPER-1670.patch
>
>
> We noticed this with jdk 1.6 where if no heap size is set the process takes 
> up to 1/4 of mem available on the machine.
> More info 
> http://stackoverflow.com/questions/3428251/is-there-a-default-xmx-setting-for-java-1-5
> You can run the following command to see what are the defaults for your 
> machine
> {code}
> java -XX:+PrintFlagsFinal -version 2>&1 | grep -i -E 
> 'heapsize|permsize|version'
> {code}
> And we noticed on two different class of machines that this was 1/4th of 
> total memory on the machine.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to