Repository navigation
eval: GraalVM vs Temurin for the Kroki backend (verdict: keep Temurin) + resource guard tooling - #100
Merged
Merged
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Swapped only the JDK under the production
kr0ki-kroki-compatimage and measured it under the production limits (--memory=2g --cpus=1, secure mode). 3 interleaved rounds, medians.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/c0deNVMe at higher priority and demotes the HDD swap to overflow. Not applied (needs root and your review).Verification
cargo test --workspaceunder the guard: 819 passed, 0 failed, 22 ignored; host min 22.4 GiB available.🤖 Generated with Claude Code
https://claude.ai/code/session_01GgXQRGsprSZc2oXGNj9n8X