Files
Claude e83c9949d8 Add jdk27-memory: compact object headers and G1-everywhere on a Spring Boot service
Spring Boot 4.1.1 catalog service measured on JDK 25, 26 and 27: live heap 320 MB to 273 MB with compact headers, per-class bytes per instance, container-sizing sweeps with real cgroup limits, 1-CPU Serial vs G1 with Native Memory Tracking, removed flags (MaxRAM, UseCompressedClassPointers), and a kernel OOM-kill check. Outputs in jdk27-memory/output.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
2026-09-24 15:09:55 +00:00

27 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Regenerates every file in output/. Needs three JDKs and, for the container runs, root plus a writable
# cgroup v1 hierarchy (the sandbox this was written in has no Docker daemon, so the limits are set by hand
# the way Docker sets them). Takes about 45 minutes.
# JDK25=/path JDK26=/path JDK27=/path ./run.sh
# FAST=1 ./run.sh one run per configuration, for a quick look
set -u
cd "$(dirname "$0")"
ORIG_JTO="${JAVA_TOOL_OPTIONS:-}" # kept only for Maven, which may need a proxy or trust store
source scripts/env.sh
RUNS=5; CRUNS=3
if [ -n "${FAST:-}" ]; then RUNS=1; CRUNS=1; fi
if [ ! -f target/catalog.jar ]; then
JAVA_HOME="$JDK25" JAVA_TOOL_OPTIONS="$ORIG_JTO" mvn -q -B -DskipTests package
fi
mkdir -p output
bash scripts/sample.sh > output/00-sample-endpoints.txt
bash scripts/flags.sh > output/01-jvm-defaults.txt
bash scripts/footprint.sh 2000000 "$RUNS" > output/02-footprint.txt
bash scripts/classes.sh > output/03-classes.txt
bash scripts/offsets.sh > output/04-offsets.txt
bash scripts/container-sizing.sh 2000000 "$CRUNS" > output/05-container-sizing.txt
bash scripts/one-cpu.sh 2000000 "$CRUNS" > output/06-one-cpu.txt
bash scripts/oom-check.sh > output/07-oom-check.txt
echo done