Skip to content

Commit 84a29dd

Browse files
committed
Make sure kafka jvm settings are the same as for pulsar
1 parent 8cf812d commit 84a29dd

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

driver-kafka/deploy/deploy-kafka.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
become: true
2525
tasks:
2626
- shell: >
27+
sudo tuned-adm profile latency-performance &&
2728
mkfs.xfs /dev/nvme0n1 &&
2829
mkdir -p /mnt/data &&
29-
mount -o defaults,noatime /dev/nvme0n1 /mnt/data
30+
mount -o defaults,noatime,nodiscard /dev/nvme0n1 /mnt/data
3031
args:
3132
creates: /mnt/data
3233
@@ -52,7 +53,7 @@
5253
path: "/opt/kafka"
5354
state: directory
5455
- get_url:
55-
url: http://mirrors.ocf.berkeley.edu/apache/kafka/1.0.0/kafka_2.12-1.0.0.tgz
56+
url: http://mirrors.ocf.berkeley.edu/apache/kafka/1.0.0/kafka_2.11-1.0.0.tgz
5657
dest: /tmp/kafka.tgz
5758
- command: tar --strip-components=1 -xvf /tmp/kafka.tgz
5859
args:
@@ -114,16 +115,19 @@
114115
unarchive:
115116
src: ../../package/target/openmessaging-benchmark-0.0.1-SNAPSHOT-bin.tar.gz
116117
dest: /opt
118+
- shell: >
119+
sudo tuned-adm profile latency-performance &&
120+
mv /opt/openmessaging-benchmark-0.0.1-SNAPSHOT /opt/benchmark
117121
- name: Configure URL
118122
lineinfile:
119-
dest: /opt/openmessaging-benchmark-0.0.1-SNAPSHOT/driver-kafka/kafka.yaml
123+
dest: /opt/benchmark/driver-kafka/kafka.yaml
120124
regexp: '^ bootstrap.servers='
121125
line: ' bootstrap.servers={{ boostrapServers }}'
122126
- name: Configure http URL
123127
lineinfile:
124-
dest: /opt/openmessaging-benchmark-0.0.1-SNAPSHOT/bin/benchmark
128+
dest: /opt/benchmark/bin/benchmark
125129
regexp: '^JVM_MEM='
126-
line: 'JVM_MEM="-Xms48G -Xmx48G -XX:+UseShenandoahGC "'
130+
line: 'JVM_MEM="-Xms24G -Xmx24G -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+PerfDisableSharedMem -XX:+AlwaysPreTouch -XX:-UseBiasedLocking"'
127131

128132

129133
- name: Hosts addresses

driver-kafka/deploy/templates/kafka.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ After=network.target
55
[Service]
66
ExecStart=/opt/kafka/bin/kafka-server-start.sh config/server.properties
77
Environment='KAFKA_HEAP_OPTS=-Xms6g -Xmx6g -XX:MetaspaceSize=96m'
8+
Environment='KAFKA_JVM_PERFORMANCE_OPTS=-server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:G1HeapRegionSize=16M -XX:MinMetaspaceFreeRatio=50 -XX:MaxMetaspaceFreeRatio=80 -Djava.awt.headless=true"
89
WorkingDirectory=/opt/kafka
910
RestartSec=1s
1011
Restart=on-failure

driver-pulsar/deploy/deploy-pulsar.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
mkfs.xfs /dev/nvme1n1 &&
2929
mkdir -p /mnt/journal &&
3030
mkdir -p /mnt/storage &&
31-
mount -o defaults,noatime,nodiscard,nobarrier /dev/nvme0n1 /mnt/journal &&
32-
mount -o defaults,noatime,nodiscard,nobarrier /dev/nvme1n1 /mnt/storage
31+
mount -o defaults,noatime,nodiscard /dev/nvme0n1 /mnt/journal &&
32+
mount -o defaults,noatime,nodiscard /dev/nvme1n1 /mnt/storage
3333
args:
3434
creates: /mnt/journal
3535
@@ -168,7 +168,9 @@
168168
unarchive:
169169
src: ../../package/target/openmessaging-benchmark-0.0.1-SNAPSHOT-bin.tar.gz
170170
dest: /opt
171-
- shell: mv /opt/openmessaging-benchmark-0.0.1-SNAPSHOT /opt/benchmark
171+
- shell: >
172+
sudo tuned-adm profile latency-performance &&
173+
mv /opt/openmessaging-benchmark-0.0.1-SNAPSHOT /opt/benchmark
172174
- name: Configure service URL
173175
lineinfile:
174176
dest: /opt/benchmark/driver-pulsar/pulsar.yaml

0 commit comments

Comments
 (0)