From 6b3a464f3b26aee7ca9f7afa8f5882e52ff6f953 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Mon, 18 Mar 2024 15:10:57 -0400 Subject: [PATCH] driver-redpanda: set JVM memory limits based on host memory Fixes issues where the benchmark worker java processes take more memory than the client instance and keep getting hit by the OOM killer / causing SSH connections to get hit by the OOM killer. --- driver-redpanda/deploy/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver-redpanda/deploy/deploy.yaml b/driver-redpanda/deploy/deploy.yaml index d405a5ab..24062a0d 100644 --- a/driver-redpanda/deploy/deploy.yaml +++ b/driver-redpanda/deploy/deploy.yaml @@ -386,7 +386,7 @@ lineinfile: dest: /opt/benchmark/bin/benchmark-worker regexp: "^JVM_MEM=" - line: 'JVM_MEM="-Xms50G -Xmx50G -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+ParallelRefProcEnabled -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=12 -XX:ConcGCThreads=12 -XX:+DisableExplicitGC -XX:-ResizePLAB"' + line: 'JVM_MEM="-Xms{{ (ansible_memfree_mb - 1024)|int }}G -Xmx50G -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+ParallelRefProcEnabled -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=12 -XX:ConcGCThreads=12 -XX:+DisableExplicitGC -XX:-ResizePLAB"' - name: Configure memory lineinfile: dest: /opt/benchmark/bin/benchmark