Repository navigation
Default runsc restore to --background and --direct-io=auto - #16399
Merged
Merged
Conversation
Replace the --direct bool flag of `runsc restore` with --direct-io, which takes auto|on|off and defaults to auto. In auto mode, the pages file is read with O_DIRECT for GPU restores if the filesystem holding it supports O_DIRECT, and through the page cache otherwise. GPU checkpoints are large and typically restored once per host, so caching their pages costs memory and CPU for no benefit. --direct is kept as a deprecated alias: with --direct-io=auto it selects --direct-io=on. Default --background to true. The restore command now returns once the kernel is loaded and keeps reading the pages file while the application runs. Use `runsc wait --restore` to find out when loading has completed and the snapshot storage can be unmounted. Pass --background=false for the previous behavior. Default `runsc checkpoint --exclude-committed-zero-pages` to true. Scanning committed pages for zeros makes checkpoints slower but smaller, which makes restores faster; restore latency usually matters more than checkpoint latency.
ayushr2
force-pushed
the
restore-direct-io
branch
from
October 25, 2026 23:02
a11d34a to
d0f7ca8
Compare
EtiennePerot
approved these changes
Oct 25, 2026
copybara-service Bot
pushed a commit
that referenced
this pull request
Oct 26, 2026
Replace the --direct bool flag of `runsc restore` with --direct-io, which takes auto|on|off and defaults to auto. In auto mode, the pages file is read with O_DIRECT for GPU restores if the filesystem holding it supports O_DIRECT, and through the page cache otherwise. GPU checkpoints are large and typically restored once per host, so caching their pages costs memory and CPU for no benefit. --direct is kept as a deprecated alias: with --direct-io=auto it selects --direct-io=on. Default --background to true. The restore command now returns once the kernel is loaded and keeps reading the pages file while the application runs. Use `runsc wait --restore` to find out when loading has completed and the snapshot storage can be unmounted. Pass --background=false for the previous behavior. Default `runsc checkpoint --exclude-committed-zero-pages` to true. Scanning committed pages for zeros makes checkpoints slower but smaller, which makes restores faster; restore latency usually matters more than checkpoint latency. Auto-fixed-by: [🤖] @EtiennePerot FUTURE_COPYBARA_INTEGRATE_REVIEW=#16399 from ayushr2:restore-direct-io d0f7ca8 PiperOrigin-RevId: 1006922095
copybara-service Bot
pushed a commit
that referenced
this pull request
Oct 27, 2026
Replace the --direct bool flag of `runsc restore` with --direct-io, which takes auto|on|off and defaults to auto. In auto mode, the pages file is read with O_DIRECT for GPU restores if the filesystem holding it supports O_DIRECT, and through the page cache otherwise. GPU checkpoints are large and typically restored once per host, so caching their pages costs memory and CPU for no benefit. --direct is kept as a deprecated alias: with --direct-io=auto it selects --direct-io=on. Default --background to true. The restore command now returns once the kernel is loaded and keeps reading the pages file while the application runs. Use `runsc wait --restore` to find out when loading has completed and the snapshot storage can be unmounted. Pass --background=false for the previous behavior. Default `runsc checkpoint --exclude-committed-zero-pages` to true. Scanning committed pages for zeros makes checkpoints slower but smaller, which makes restores faster; restore latency usually matters more than checkpoint latency. Auto-fixed-by: [🤖] @EtiennePerot FUTURE_COPYBARA_INTEGRATE_REVIEW=#16399 from ayushr2:restore-direct-io d0f7ca8 PiperOrigin-RevId: 1006922095
copybara-service Bot
pushed a commit
that referenced
this pull request
Oct 27, 2026
Replace the --direct bool flag of `runsc restore` with --direct-io, which takes auto|on|off and defaults to auto. In auto mode, the pages file is read with O_DIRECT for GPU restores if the filesystem holding it supports O_DIRECT, and through the page cache otherwise. GPU checkpoints are large and typically restored once per host, so caching their pages costs memory and CPU for no benefit. --direct is kept as a deprecated alias: with --direct-io=auto it selects --direct-io=on. Default --background to true. The restore command now returns once the kernel is loaded and keeps reading the pages file while the application runs. Use `runsc wait --restore` to find out when loading has completed and the snapshot storage can be unmounted. Pass --background=false for the previous behavior. Default `runsc checkpoint --exclude-committed-zero-pages` to true. Scanning committed pages for zeros makes checkpoints slower but smaller, which makes restores faster; restore latency usually matters more than checkpoint latency. Auto-fixed-by: [🤖] @EtiennePerot FUTURE_COPYBARA_INTEGRATE_REVIEW=#16399 from ayushr2:restore-direct-io d0f7ca8 PiperOrigin-RevId: 1006922095
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.
Replace the --direct bool flag of
runsc restorewith --direct-io, whichtakes auto|on|off and defaults to auto. In auto mode, the pages file is read
with O_DIRECT for GPU restores if the filesystem holding it supports
O_DIRECT, and through the page cache otherwise. GPU checkpoints are large
and typically restored once per host, so caching their pages costs memory
and CPU for no benefit. --direct is kept as a deprecated alias: with
--direct-io=auto it selects --direct-io=on.
Default --background to true. The restore command now returns once the
kernel is loaded and keeps reading the pages file while the application
runs. Use
runsc wait --restoreto find out when loading has completed andthe snapshot storage can be unmounted. Pass --background=false for the
previous behavior.
Default
runsc checkpoint --exclude-committed-zero-pagesto true. Scanningcommitted pages for zeros makes checkpoints slower but smaller, which makes
restores faster; restore latency usually matters more than checkpoint
latency.