Skip to content

eval: GraalVM vs Temurin for the Kroki backend (verdict: keep Temurin) + resource guard tooling - #100

Merged
elasticdotventures merged 3 commits into
mainfrom
feat/graalvm-kroki-eval
Oct 15, 2026
Merged

elasticdotventures merged 3 commits into
mainfrom
feat/graalvm-kroki-eval

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

Summary

Swapped only the JDK under the production kr0ki-kroki-compat image and measured it under the production limits (--memory=2g --cpus=1, secure mode). 3 interleaved rounds, medians.

JDK 4-thread rps p95 ms cgroup peak MiB
Temurin 21.0.9 (prod) 1.9 5272 214
GraalVM CE 21.0.2 1.6 6588 272
Temurin 25.0.4.1 2.0 4892 150
GraalVM CE 25.0.4.1.1 1.6 6286 196

Verdict: keep Temurin. The 25 pair is patch-matched; the 21 pair is not (stated in the doc). Not tested: Oracle GraalVM, Native Image, polyglot/Truffle. The Java/Rust/WASM interop motivation is not evaluated by a JDK swap and would need its own candidate.

Constraint found: the official GraalVM 25 container image needs x86-64-v3 and will not start on this node (v2 only). The tarball JDK runs fine on the Ubuntu base, so it was used instead (sha256 verified).

Also in this PR

  • scripts/guard-run.sh: runs a command in a capped scope while sampling host memory/PSI/swap; stops the job (exit 99) before the host is starved. Tested for a normal pass and a forced trip. Used for the cargo run and both benchmarks.
  • scripts/setup-nvme-swap.sh: dry run by default; puts swap on /c0de NVMe at higher priority and demotes the HDD swap to overflow. Not applied (needs root and your review).
  • Docling memory measurements and the 2026-10-07 host-stall findings are in the eval doc.

Verification

  • cargo test --workspace under the guard: 819 passed, 0 failed, 22 ignored; host min 22.4 GiB available.
  • Both benchmark runs: host min 25 GiB available, memory PSI 0.00 %.
  • The playbook and agent suites were not re-run for this PR (no code they cover changed).

🤖 Generated with Claude Code

https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X

elasticdotventures and others added 3 commits October 7, 2026 11:26
… NVMe swap tooling

Swapped only the JDK under the production kroki-compat image and measured it under the production container limits, at JDK 21
(not patch-matched) and JDK 25 (patch-matched). Temurin wins on throughput, p95 latency and memory on both. Evidence JSON and
write-up under docs/evaluations. Also records the Docling memory measurements and the 2026-10-07 host-stall findings.

Adds scripts/guard-run.sh (run a command in a capped scope while watching host memory/PSI and aborting before the host is
starved) and scripts/setup-nvme-swap.sh (dry run by default: higher-priority swap on /c0de, HDD swap demoted to overflow).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X
Kept for reproducing the evaluation; nothing builds or references it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X
A single 2 s PSI sample (13 % while 18 GB was available) stopped three jobs at once when they started together. Memory-stall
pressure must now persist for PSI_SAMPLES (default 3 = 6 s); low MemAvailable still trips immediately.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X
@elasticdotventures
elasticdotventures merged commit 5127cd7 into main Oct 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant