Skip to content

Commit

Permalink
set JVM options -Xmx -Xms
Browse files Browse the repository at this point in the history
  • Loading branch information
fhussonnois committed Mar 19, 2021
1 parent 40250aa commit f9ca212
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions zk-kafka-multiple-nodes-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ services:
- "5556:5556"
environment:
CONFIG_YML : "/etc/jmx_exporter/config.yml"
JVM_OPTS: "-Xmx512M"
volumes:
- ./etc/jmx_exporter/config_kafka101.yml:/etc/jmx_exporter/config.yml
container_name: jmx-kafka101
Expand All @@ -55,6 +56,8 @@ services:
- "5557:5556"
environment:
CONFIG_YML : "/etc/jmx_exporter/config.yml"
JVM_OPTS: "-Xmx512M"

volumes:
- ./etc/jmx_exporter/config_kafka102.yml:/etc/jmx_exporter/config.yml
container_name: jmx-kafka102
Expand All @@ -67,6 +70,7 @@ services:
- "5558:5556"
environment:
CONFIG_YML : "/etc/jmx_exporter/config.yml"
JVM_OPTS: "-Xmx512M"
volumes:
- ./etc/jmx_exporter/config_kafka103.yml:/etc/jmx_exporter/config.yml
container_name: jmx-kafka103
Expand Down Expand Up @@ -105,6 +109,7 @@ services:
CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: zookeeper1:2181
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_ENABLE: 'false'
KAFKA_HEAP_OPTS: '-Xmx512M -Xms512M'

kafka102:
image: confluentinc/cp-kafka:latest
Expand All @@ -127,6 +132,7 @@ services:
CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: zookeeper1:2181
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_ENABLE: 'false'
KAFKA_HEAP_OPTS: '-Xmx512M -Xms512M'

kafka103:
image: confluentinc/cp-kafka:latest
Expand All @@ -149,3 +155,4 @@ services:
CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: zookeeper1:2181
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_ENABLE: 'false'
KAFKA_HEAP_OPTS: '-Xmx512M -Xms512M'
6 changes: 6 additions & 0 deletions zk-kafka-single-node-full-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ services:
- "5556:5556"
environment:
CONFIG_YML : "/etc/jmx_exporter/config.yml"
JVM_OPTS: "-Xmx512M"
volumes:
- ./etc/jmx_exporter/config_kafka101.yml:/etc/jmx_exporter/config.yml
container_name: jmx-kafka101
Expand Down Expand Up @@ -82,6 +83,7 @@ services:
CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: zookeeper1:2181
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_ENABLE: 'false'
KAFKA_HEAP_OPTS: '-Xmx512M -Xms512M'

kafka-schema-registry:
image: confluentinc/cp-schema-registry:latest
Expand All @@ -93,6 +95,7 @@ services:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka101:29092
SCHEMA_REGISTRY_HOST_NAME: kafka-schema-registry
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
SCHEMA_REGISTRY_OPTS: '-Xms512M -Xmx512M'
depends_on:
- zk1
- kafka101
Expand All @@ -108,6 +111,8 @@ services:
KSQL_KSQL_SCHEMA_REGISTRY_URL: http://kafka-schema-registry:8081
KSQL_KSQL_EXTENSION_DIR: /var/lib/ksql/extension
KSQL_KSQL_SERVICE_ID: ksqldb-server_
KSQL_HEAP_OPTS: '-Xms512M -Xmx1G'

depends_on:
- zk1
- kafka101
Expand Down Expand Up @@ -139,6 +144,7 @@ services:
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: "1"
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: "1"
CONNECT_PLUGIN_PATH: '/usr/share/java,/etc/kafka-connect/jars'
KAFKA_HEAP_OPTS: '-Xmx512M -Xms512M'
volumes:
- ./connectors:/etc/kafka-connect/jars/
depends_on:
Expand Down
1 change: 1 addition & 0 deletions zk-kafka-single-node-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,4 @@ services:
CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: zookeeper1:2181
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_ENABLE: 'false'
KAFKA_HEAP_OPTS: '-Xmx512M -Xms512M'

0 comments on commit f9ca212

Please sign in to comment.