Skip to content

Default runsc restore to --background and --direct-io=auto - #16399

Merged
copybara-service[bot] merged 1 commit into
gvisor:masterfrom
ayushr2:restore-direct-io
Oct 27, 2026
Merged

copybara-service[bot] merged 1 commit into
gvisor:masterfrom
ayushr2:restore-direct-io

Conversation

@ayushr2

@ayushr2 ayushr2 commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

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.

Comment thread g3doc/user_guide/checkpoint_restore.md Resolved
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.
@EtiennePerot EtiennePerot added the ready to pull Causes the PR to be imported into Google. Will be removed soon. label Oct 25, 2026
@EtiennePerot EtiennePerot added this to the Lightspeed milestone 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
@copybara-service
copybara-service Bot merged commit 9f2bc5e into gvisor:master Oct 27, 2026
14 checks passed
@ayushr2
ayushr2 deleted the restore-direct-io branch November 12, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to pull Causes the PR to be imported into Google. Will be removed soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants