对应原文出处:
https://support.pivotal.io/hc/en-us/articles/201861286-Zookeeper-service-heapsize-is-10GB-or-more-resulting-in-java-lang-OutOfMemoryError-for-various-services
If the /etc/gphd/zookeeper/conf/java.env does not exist then create it. Add the following entry to set zookeeper max heapsize to 1024MB. Then restart the zookeeper service.
如果/etc/gphd/zookeeper/conf/java.env文件不存在,这创建它。并且设置zookeeper最大heapsize为1024MB。然后启动zookeeper
export JVMFLAGS="-Xmx724m -Xms724m"
调整zookeeper heap大小,目的在于避免oom,同时减少sawp空间交换带来的性能下降。