How do I set the Java options for Kafka?

后端 未结 6 1687
轮回少年
轮回少年 2020-12-13 06:12

I\'ve been experimenting with Kafka and saw from the documentation on the main site that you\'re able to set different options for the jvm like heap size and the garbage col

6条回答
  •  情深已故
    2020-12-13 06:48

    Another way to do this is by modifying information written in /bin/kafka-server-start.sh:

    export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
    

    or in /bin/kafka-run-class.sh:

    KAFKA_JVM_PERFORMANCE_OPTS="-server -XX:+UseCompressedOops -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC -Djava.awt.headless=true"
    

提交回复
热议问题