Repository navigation
Conversation
milantracy
left a comment
There was a problem hiding this comment.
thanks!
can you
- rebase
- add tests that use a no-root sandbox, and restore with --defer-checkpoint
2bcf14e to
b09ed75
Compare
Thanks! Rebased and addressed the comments, including no-root deferred restore tests. Local build, lint, and KVM tests pass. Please take another look. |
419a6d7 to
6c2ff21
Compare
|
What is a "no-root sandbox". The "root" word is very overloaded. Are you talking about the root container (first/pause container). Or root UID? |
"root" means the root (pause in k8s) container, not root UID. This is the existing --no-root-container mode, where the pause container has no process in the sandbox. The sandbox can therefore be prepared before the checkpoint is known, and the checkpoint is bound only when the child is restored. This takes pod setup off the resume path (20~50ms improvement). |
Prepare no-root sandboxes without opening checkpoint files. Bind the checkpoint when the first explicit child restore supplies it, and initialize the readers once outside the loader mutex. Verify that later child restores resolve to the same open checkpoint directory. Refresh deferred child mounts before gofer creation so orchestration can create children before workload assignment. Publish the first restore failure before releasing checkpoint resources, and serialize it with the final child registration. Keep the session available when a plain start arrives before checkpoint binding. Close rejected child descriptors and clean up asynchronous loads and memory files according to their ownership and the private loader kickoff state. Cover deferred restore through the CLI and the container API, including path aliases, CPU limits after a translated start, failure ordering, and checkpoint resource cleanup. Signed-off-by: gaojingyu <[email protected]>
6c2ff21 to
d4ffac0
Compare
Allow a no-root sandbox to complete root preparation before workload assignment,
then bind checkpoint files through an explicit child restore.
When root start waits for a checkpoint, kubelet cannot advance past
RunPodSandboxto create and start application containers. This keeps childCRI and OCI preparation on the restore request path.
With
--defer-checkpoint, orchestration can prepare the root, precreate thechild and wait at child start. Once assigned, child restore supplies the
checkpoint and authorized mounts.
Root restore prepares networking and the main MemoryFile, pauses the loader
kernel and registers the root. The first explicit child restore initializes
checkpoint readers once, outside the loader mutex. The existing registration
barrier triggers shared kernel restore. Assigned mounts are refreshed before
Gofer creation.
This is opt-in for no-root sandboxes with a child. Existing loader states and
ordinary restore behavior are retained. Split filesystem restore is unsupported.
Validation
Validated in our self-hosted production Kubernetes cluster using dedicated
synthetic workloads. Both modes used the same runtime build, workload and
resource configuration, with no-root, systrap, background restore, uncompressed
checkpoints and warm local page cache. Ten restores per mode were run
sequentially.
Median resume latency decreased by 70.9 ms (26.9%). Baseline/deferred
standard deviations were 45.1/21.9 ms.
The metric covers the server-side resume operation through guest availability.
It measures this change together with orchestration precreating the child.
PID, process start, a 32 MiB memory checksum, persistent-file marker and counter
continuity were preserved. Results are specific to this deployment; the final
rebased revision has not been rebenchmarked.
Local source validation passed for the full
//:releasebuild,make lint,make lint-cc,config_test,serialization_test, andboot_testwithTestRunexcluded.TestRunfails with seccomp notificationEBUSYon both this change andunmodified upstream master.
Related to #15803.
Page-loading prioritization is separate work.