From 4dca42e30a96e9bce6e6088c9030cfa786695109 Mon Sep 17 00:00:00 2001 From: Yuriy Bezsonov Date: Tue, 13 Oct 2026 07:56:30 +0200 Subject: [PATCH] fix(perf-sensor): CRaC warm-up bounds each request to 10 s and skips a failed one One warm-up request that never returned held the checkpoint build until the block timeout, and a failed one stopped it under set -e. The warm-up only compiles the hot path, so a single request must not break the build. --- .../java-on-eks-optimization/references/Dockerfile.crac | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/perf-sensor/skills/java-on-eks-optimization/references/Dockerfile.crac b/apps/perf-sensor/skills/java-on-eks-optimization/references/Dockerfile.crac index 11be7734..3bf5f1bd 100644 --- a/apps/perf-sensor/skills/java-on-eks-optimization/references/Dockerfile.crac +++ b/apps/perf-sensor/skills/java-on-eks-optimization/references/Dockerfile.crac @@ -35,8 +35,9 @@ RUN --mount=type=cache,target=/root/.m2 mvn clean package -DskipTests -ntp && mv # has never served a request, so the restored JVM starts in 0.2 s and then JITs the whole # request path under production load (seconds of compilation on a 1-vCPU quota: throttling # and latency in the first minutes). Start the app, drive WARMUP_REQUESTS through the hot -# path, then checkpoint with jcmd. Open FDs are reported (collect-fd-stacktraces) so a -# missing Resource hook fails loudly. +# path, then checkpoint with jcmd. Each warm-up request is bounded to 10 s and a failed one +# is skipped: the warm-up only compiles the hot path, one request must not stop the build. +# Open FDs are reported (collect-fd-stacktraces) so a missing Resource hook fails loudly. # GC, HEAP BOUNDS AND CPU COUNT ARE BAKED INTO THE CHECKPOINT and cannot change at restore: # - GC: SerialGC for a <= 1 vCPU pod (the CRaC JDK would otherwise default to G1). # - Heap: JAVA_HEAP_OPTS sets -Xmx/-Xms from the pod's memory limit (75 % / 50 % of @@ -70,7 +71,7 @@ RUN --mount=type=secret,id=db-password set -e; \ -jar /app.jar & PID=$!; \ for i in $(seq 1 90); do curl -sf http://localhost:8080/actuator/health >/dev/null 2>&1 && break; sleep 1; done; \ curl -sf http://localhost:8080/actuator/health >/dev/null; \ - for i in $(seq 1 ${WARMUP_REQUESTS}); do eval "${WARMUP_CMD}"; done; \ + for i in $(seq 1 ${WARMUP_REQUESTS}); do timeout 10 sh -c "${WARMUP_CMD}" || true; done; \ sleep 2; jcmd ${PID} JDK.checkpoint; wait ${PID} || true; \ test -d /opt/crac-files