Set jvm parameters for tomcat, zookeeper, activeMQ, and Kafka, and set zookeeperactivemq

Source: Internet
Author: User

Set jvm parameters for tomcat, zookeeper, activeMQ, and Kafka, and set zookeeperactivemq
1. Set jvm parameters for tomcatSetting method:
Add configuration in the tomcat bin directory:Setenv. sh

#add tomcat pidCATALINA_PID="$CATALINA_BASE/conf/tomcat.pid"#add java optsJAVA_OPTS=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true \  -server -Xmx1g -Xms1g -Xmn256m -XX:PermSize=128m -Xss256k -XX:+DisableExplicitGC \  -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection \  -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly \  -XX:CMSInitiatingOccupancyFraction=70"

For parameters, see dubbo configuration.
2. Set jvm parameters for zookeeper Setting method:
In the zookeeper bin directory, modify ZkEnv. sh:
Add SERVER_JVMFLAGSVariable.
ZOOBINDIR="${ZOOBINDIR:-/usr/bin}"ZOOKEEPER_PREFIX="${ZOOBINDIR}/.."SERVER_JVMFLAGS=" -server -Xmx2g -Xms2g -Xmn256m -XX:PermSize=128m -Xss256k -XX:+DisableExplicitGC \  -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection \  -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly \  -XX:CMSInitiatingOccupancyFraction=70 "

For parameters, see dubbo configuration.

3. Set jvm parameters in ActiveMQ.
Setting method:
Modify the ActiveMQ script in the activemq bin directory and set it in the header:
Add the ACTIVEMQ_OPTS_MEMORY variable.
ACTIVEMQ_OPTS_MEMORY=" -server -Xmx5g -Xms5g -Xmn1280m -XX:PermSize=640m -Xss1280k -XX:+DisableExplicitGC \  -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection \  -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly \  -XX:CMSInitiatingOccupancyFraction=70 "

For parameters, see dubbo configuration.

4. Set jvm parameters for kafka
Setting method:

Modify the kafka-server-start.sh file under the Kafka bin directory:
export KAFKA_HEAP_OPTS=" -Xmx5g -Xms5g -Xmn1280m -XX:PermSize=640m -Xss1280k "




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.