Set jvm parameters for tomcat, zookeeper, activeMQ, and Kafka
1. How to Set jvm parameters for tomcat:
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 = 128 m-Xss256k-XX: + DisableExplicitGC \-XX: + UseConcMarkSweepGC-XX: + response-XX: + UseCMSCompactAtFullCollection \-XX: LargePageSizeInBytes = 128 m-XX: + UseFastAccessorMethods-XX: + usecmsinitiatingoccupancycyonly \-XX: cmsinitiatingoccupanfraction = 70"
ZkEnv. sh:
SERVER_JVMFLAGSVariable.
ZOOBINDIR = "$ {ZOOBINDIR:-/usr/bin}" ZOOKEEPER_PREFIX = "$ {ZOOBINDIR }/.. "SERVER_JVMFLAGS ="-server-Xmx2g-Xms2g-Xmn256m-XX: PermSize = 128 m-Xss256k-XX: + DisableExplicitGC \-XX: + UseConcMarkSweepGC-XX: + response-XX: + UseCMSCompactAtFullCollection \-XX: LargePageSizeInBytes = 128 m-XX: + UseFastAccessorMethods-XX: + usecmsinitiatingoccupancycyonly \-XX: cmsinitiatingoccupanfraction = 70"
Container = "-server-xmx5 G-xms5 G-Xmn1280m-XX: PermSize = 640 m-Xss1280k-XX: + DisableExplicitGC \-XX: + UseConcMarkSweepGC-XX: + container-XX: + UseCMSCompactAtFullCollection \-XX: LargePageSizeInBytes = 128 m-XX: + UseFastAccessorMethods-XX: + usecmsinitiatingoccupancycyonly \-XX: cmsinitiatingoccupanfraction = 70"
Export KAFKA_HEAP_OPTS = "-xmx5 G-xms5 G-Xmn1280m-XX: PermSize = 640 m-Xss1280k"