Skip to content

Commit 964f2ad

Browse files
committed
Expose knobs for tuning the Kafka replication & retained bytes
1 parent 344c255 commit 964f2ad

File tree

3 files changed

+48
-5
lines changed

3 files changed

+48
-5
lines changed

larger.env

+3
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ WHISK_ACTIONS_INVOKES_CONCURRENT=100
2929
WHISK_ACTIONS_INVOKES_CONCURRENT_IN_SYSTEM=5000
3030
WHISK_ACTIONS_INVOKES_PER_MINUTE=600
3131
WHISK_TRIGGERS_FIRES_PER_MINUTE=600
32+
WHISK_KAFKA_REPLICATION_FACTOR=2
33+
WHISK_KAFKA_TOPICS_INVOKER_RETENTION_BYTES=536870912
34+
WHISK_KAFKA_TOPICS_COMPLETED_RETENTION_BYTES=536870912

persistent-template.yml

+25-5
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,16 @@ parameters:
133133
displayName: Number of Zookeper cluster nodes (odd number of nodes is recomended)
134134
required: true
135135
value: "1"
136-
- name: KAFKA_NODE_COUNT
137-
description: Number of Kafka cluster nodes which will be deployed
138-
displayName: Number of Kafka cluster nodes
139-
required: true
140-
value: "1"
141136
- name: ZOOKEEPER_VOLUME_CAPACITY
142137
description: Volume space available for Zookeeper data, e.g. 512Mi, 2Gi.
143138
displayName: Zookeeper Volume Capacity
144139
required: true
145140
value: 1Gi
141+
- name: KAFKA_NODE_COUNT
142+
description: Number of Kafka cluster nodes which will be deployed
143+
displayName: Number of Kafka cluster nodes
144+
required: true
145+
value: "1"
146146
- name: KAFKA_VOLUME_CAPACITY
147147
description: Volume space available for Kafka data, e.g. 512Mi, 2Gi.
148148
displayName: Kafka Volume Capacity
@@ -194,6 +194,18 @@ parameters:
194194
description: Default memory an action requests if unspecified.
195195
value: "256 m"
196196
required: true
197+
- name: WHISK_KAFKA_REPLICATION_FACTOR
198+
description: Replication factor for all OpenWhisk topics
199+
value: "1"
200+
required: true
201+
- name: WHISK_KAFKA_TOPICS_COMPLETED_RETENTION_BYTES
202+
description: Maximum bytes to retain for the completed activations topic for each Controller. Each kafka node will consume this many bytes times the number of Controllers just for the completed topics. So, if this is set to 1GB and you have 3 Controllers then expect up to 3GB of disk space used by the Controller topics.
203+
value: "268435456"
204+
required: true
205+
- name: WHISK_KAFKA_TOPICS_INVOKER_RETENTION_BYTES
206+
description: Maximum bytes to retain for each Invoker topic. Each Kafka node will consume this many bytes times the number of Invokers just for the Invoker topics. So, if this is set to 1GB and you have 10 Invokers then expect up to 10GB of disk space used by the Invoker topics.
207+
value: "268435456"
208+
required: true
197209
- name: OPENWHISK_VERSION
198210
description: The DockerHub tag for openwhisk/{controller,invoker}
199211
value: "rhdemo-6ee19949"
@@ -690,6 +702,10 @@ objects:
690702
value: "${WHISK_ACTIONS_MEMORY_MIN}"
691703
- name: "CONFIG_whisk_memory_std"
692704
value: "${WHISK_ACTIONS_MEMORY_STD}"
705+
- name: "CONFIG_whisk_kafka_replicationFactor"
706+
value: "${WHISK_KAFKA_REPLICATION_FACTOR}"
707+
- name: "CONFIG_whisk_kafka_topics_completed_retentionBytes"
708+
value: "${WHISK_KAFKA_TOPICS_COMPLETED_RETENTION_BYTES}"
693709

694710
# extra JVM arguments
695711
- name: "JAVA_OPTS"
@@ -1125,6 +1141,10 @@ objects:
11251141
value: "${WHISK_ACTIONS_MEMORY_MIN}"
11261142
- name: "CONFIG_whisk_memory_std"
11271143
value: "${WHISK_ACTIONS_MEMORY_STD}"
1144+
- name: "CONFIG_whisk_kafka_replicationFactor"
1145+
value: "${WHISK_KAFKA_REPLICATION_FACTOR}"
1146+
- name: "CONFIG_whisk_kafka_topics_invoker_retentionBytes"
1147+
value: "${WHISK_KAFKA_TOPICS_INVOKER_RETENTION_BYTES}"
11281148
- name: "DOCKER_IMAGE_PREFIX"
11291149
valueFrom:
11301150
configMapKeyRef:

template.yml

+20
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,18 @@ parameters:
179179
description: Default memory an action requests if unspecified.
180180
value: "256 m"
181181
required: true
182+
- name: WHISK_KAFKA_REPLICATION_FACTOR
183+
description: Replication factor for all OpenWhisk topics
184+
value: "1"
185+
required: true
186+
- name: WHISK_KAFKA_TOPICS_COMPLETED_RETENTION_BYTES
187+
description: Maximum bytes to retain for the completed activations topic for each Controller. Each kafka node will consume this many bytes times the number of Controllers just for the completed topics. So, if this is set to 1GB and you have 3 Controllers then expect up to 3GB of disk space used by the Controller topics.
188+
value: "268435456"
189+
required: true
190+
- name: WHISK_KAFKA_TOPICS_INVOKER_RETENTION_BYTES
191+
description: Maximum bytes to retain for each Invoker topic. Each Kafka node will consume this many bytes times the number of Invokers just for the Invoker topics. So, if this is set to 1GB and you have 10 Invokers then expect up to 10GB of disk space used by the Invoker topics.
192+
value: "268435456"
193+
required: true
182194
- name: OPENWHISK_VERSION
183195
description: The DockerHub tag for openwhisk/{controller,invoker}
184196
value: "rhdemo-6ee19949"
@@ -675,6 +687,10 @@ objects:
675687
value: "${WHISK_ACTIONS_MEMORY_MIN}"
676688
- name: "CONFIG_whisk_memory_std"
677689
value: "${WHISK_ACTIONS_MEMORY_STD}"
690+
- name: "CONFIG_whisk_kafka_replicationFactor"
691+
value: "${WHISK_KAFKA_REPLICATION_FACTOR}"
692+
- name: "CONFIG_whisk_kafka_topics_completed_retentionBytes"
693+
value: "${WHISK_KAFKA_TOPICS_COMPLETED_RETENTION_BYTES}"
678694

679695
# extra JVM arguments
680696
- name: "JAVA_OPTS"
@@ -1104,6 +1120,10 @@ objects:
11041120
value: "${WHISK_ACTIONS_MEMORY_MIN}"
11051121
- name: "CONFIG_whisk_memory_std"
11061122
value: "${WHISK_ACTIONS_MEMORY_STD}"
1123+
- name: "CONFIG_whisk_kafka_replicationFactor"
1124+
value: "${WHISK_KAFKA_REPLICATION_FACTOR}"
1125+
- name: "CONFIG_whisk_kafka_topics_invoker_retentionBytes"
1126+
value: "${WHISK_KAFKA_TOPICS_INVOKER_RETENTION_BYTES}"
11071127
- name: "DOCKER_IMAGE_PREFIX"
11081128
valueFrom:
11091129
configMapKeyRef:

0 commit comments

Comments
 (0)