diff --git a/group_vars/default/pvc.yml b/group_vars/default/pvc.yml index d74a19a..c752350 100644 --- a/group_vars/default/pvc.yml +++ b/group_vars/default/pvc.yml @@ -72,11 +72,16 @@ pvc_asn: "65500" pvc_routers: - "192.168.100.1" -# Ceph OSD tuning -# > Uncomment in low-memory situation (nodes with <32GB RAM). -# > These options are *only* applied at cluster bootstrap and cannot be changed later. +# Memory tuning +# > Uncomment these options in low-memory situations (nodes with <32GB RAM). # OSD memory limit - 939524096 (~900MB) is the lowest possible value; default is 4GB. +# > This option is *only* applied at cluster bootstrap and cannot be changed later +# here, only by editing the `files/ceph//ceph.conf` file directly. #pvc_osd_memory_limit: 939524096 +# Zookeeper heap memory limit, sets Xms and Xmx values to the Java process. +#pvc_zookeeper_heap_limit: 32M +# Zookeeper stack memory limit, sets Xss value to the Java process. +#pvc_zookeeper_stack_limit: 32M # Node list # > Every node configured with this playbook must be specified in this list. diff --git a/roles/pvc/templates/zookeeper/environment.j2 b/roles/pvc/templates/zookeeper/environment.j2 index 8e763b2..e571fd2 100644 --- a/roles/pvc/templates/zookeeper/environment.j2 +++ b/roles/pvc/templates/zookeeper/environment.j2 @@ -13,6 +13,6 @@ JMXLOCALONLY=false # cluster is only ~5.2MB of raw JSON data and beyond 12x that seems like a cluster too large for PVC. # Xms/Xmx=128M # Reduce the Java memory size to minimize RAM consumption by Zookeeper. -JAVA_OPTS="-Djava.net.preferIPv4Stack=True -Djute.maxbuffer=67108864 -Xms128M -Xmx128M" +JAVA_OPTS="-Djava.net.preferIPv4Stack=True -Djute.maxbuffer=67108864 -Xms{{ pvc_zookeeper_heap_limit }} -Xmx{{ pvc_zookeeper_heap_limit }} -Xss{{ pvc_zookeeper_stack_limit }}" JAVA=/usr/bin/java CLASSPATH="/etc/zookeeper/conf:/usr/share/java/jline.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:/usr/share/java/zookeeper.jar"