A recommended setting for JVM looks like following
-Xmx8g -Xms8g -XX:MetaspaceSize=96m -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:G1HeapRegionSize=16M -XX:MinMetaspaceFreeRatio=50 -XX:MaxMetaspaceFreeRatio=80
my question is - How do I set the above Java options for Kafka?
I know for sure that we can set
export KAFKA_HEAP_OPTS="-Xmx8G -Xms8G"
but not sure if we can append the whole line
"-Xmx8g -Xms8g -XX:MetaspaceSize=96m -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:G1HeapRegionSize=16M -XX:MinMetaspaceFreeRatio=50 -XX:MaxMetaspaceFreeRatio=80"
to KAFKA_HEAP_OPTS variable
reference - https://community.hortonworks.com/articles/80813/kafka-best-practices-1.html
/bin/kafka-server-start.sh