mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
Process-only measurements do not show how compressed pages affect a containerized inference server, where Podman configuration, model startup, and service readiness are part of the restore path. SGLang also needs content validation so a quick restore cannot hide damaged state. Add a CPU and GPU SGLang benchmark that checkpoints through Podman. Compare uncompressed, per-page LZ4, and region LZ4 images. Send the same deterministic chat request before and after restore, compare response hashes, measure archive and operation costs, and verify the compression mode and region size recorded in the exported inventory. Derive the local serving URL from the selected port unless one is supplied. Podman passes CRIU options through the host-wide runc.conf. Serialize updates with a canonical lock and crash-recovery journal, preserve file metadata and xattrs, refuse to overwrite external changes, and restore the original configuration on success and during error or signal cleanup. Isolate CRIU from ambient defaults, keep access tokens out of arguments and diagnostics, detect stopped containers during health checks, and preserve failed artifacts. Add a bounded CPU test runner. Assisted-by: Codex:GPT-5 Assisted-by: Claude:claude-fable-5 Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
30 lines
789 B
Bash
Executable file
30 lines
789 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
root=$(cd -- "$(dirname -- "$0")/../../../.." && pwd)
|
|
|
|
: "${SGLANG_CPU_IMAGE:?SGLANG_CPU_IMAGE must name an image built from SGLang docker/xeon.Dockerfile}"
|
|
: "${SGLANG_CPU_MODEL:=Qwen/Qwen2.5-0.5B-Instruct}"
|
|
|
|
if [ "$(id -u)" -ne 0 ]; then
|
|
echo "compression/sglang: must run as root" >&2
|
|
exit 1
|
|
fi
|
|
|
|
timeout --foreground --kill-after=60s 3600s python3 \
|
|
"$root/contrib/compression-benchmark/podman-sglang.py" \
|
|
--accelerator cpu \
|
|
--image "$SGLANG_CPU_IMAGE" \
|
|
--model "$SGLANG_CPU_MODEL" \
|
|
--iterations 1 \
|
|
--modes uncompressed lz4-page lz4-region \
|
|
--region-sizes 65536 \
|
|
--decompress-threads 4 \
|
|
--archive-compression none \
|
|
--max-total-tokens 512 \
|
|
--context-length 512 \
|
|
--max-tokens 4 \
|
|
--shm-size 4g \
|
|
--wait-seconds 1200 \
|
|
--request-timeout 300
|