podman: add opt-in local tfork API - #14
Open
yiying-zhang wants to merge 70 commits into
Open
Conversation
Stabilize live tfork source freezing
…-main Stabilize single-copy tfork clone path
Rewrite tclone setup for Gensee Crate
Clarify Gensee tclone host setup
Initialize temporary CRIU process UIDs
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
POST /libpod/containers/{name}/tforkfor a resident local Podmanservice;
PODMAN_TFORK_LOCAL_API=1;JSON fields;
Why
Every direct TClone starts a new Podman CLI and reinitializes libpod, storage,
runtime, and client state. Keeping only CRIU's service warm saved effectively
nothing (0.014 ms paired median), so this branch tests the useful worker
boundary: a resident Podman/libpod process plus a persistent local client.
Performance
On
137.110.161.221, a controlled four-process Alpine source measured:The paired median saving was 86.338 ms, with 30/30 resident wins. Ten-pair
process scaling saved 91.5 ms at 1 process, 107.4 ms at 4, 84.9 ms at 25, and
86.6 ms at 100. This reduces fixed overhead but does not flatten CRIU's
per-process slope.
Validation
go test ./pkg/api/handlers/libpod ./pkg/api/serverpasses;Security and deployment notes
This endpoint is intentionally local and opt-in. Production deployment must
place the socket in a root-owned directory, restrict its mode/group, validate
peer credentials and container authorization, and run one authoritative
libpod service per state store. A source must be addressed by immutable ID plus
generation; running two long-lived services against the same database exposed
a stale-name-generation failure during prototype testing.
This branch does not yet cache source pidfds, namespaces, mount handles, task
graphs, or mutation manifests. Those are later optimizations with separate
correctness and performance gates.