Skip to content

Commit b076310

Browse files
sbx: virtiofs caching is now enabled by default on all platforms (#25538)
<!--Delete sections as needed --> ## Description As of v0.35.0, virtiofs caching is enabled by default on all operating systems. Previously it was opt-in on Windows. Release notes: https://github.com/docker/sandboxes/releases/tag/v0.35.0 > Enable virtiofs caching by default on all operating systems for faster > filesystem performance (`DOCKER_SANDBOXES_ENABLE_VIRTIOFS_CACHE=0` to opt out). Upstream change: docker/sandboxes#3882 ### `architecture.md` Adds a note in the "Storage and persistence" section that virtiofs caching is on by default everywhere, with a brief description of what it does and the `=0` opt-out. ### `troubleshooting.md` Removes the platform distinction and the Windows `=1` opt-in example from the "Filesystem operations are slow" section. Keeps the `=0` kill switch and the Git index corruption note. ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review --------- Signed-off-by: Craig Osterhout <craig.osterhout@docker.com>
1 parent 9755520 commit b076310

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

content/manuals/ai/sandboxes/architecture.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ share images or layers.
3838
Each sandbox consumes disk space for its VM image, Docker images, container
3939
layers, and volumes, and this grows as you build images and install packages.
4040

41+
Virtiofs caching is enabled by default on all operating systems. File reads
42+
from the sandbox VM are cached on the host side, reducing round-trips through
43+
the filesystem passthrough and improving performance for read-heavy workloads
44+
such as `git status` or directory scans. To opt out, set
45+
`DOCKER_SANDBOXES_ENABLE_VIRTIOFS_CACHE=0` when creating the sandbox:
46+
47+
```console
48+
$ DOCKER_SANDBOXES_ENABLE_VIRTIOFS_CACHE=0 sbx run <template>
49+
```
50+
4151
## Networking
4252

4353
All outbound traffic from the sandbox routes through an HTTP/HTTPS proxy on

content/manuals/ai/sandboxes/troubleshooting.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,9 @@ default for workspaces without `--clone`). Virtiofs caching speeds up these
192192
workloads. Clone-mode sandboxes always enable it, so this tuning applies only
193193
to direct mode.
194194

195-
On macOS and Linux, virtiofs caching is enabled by default. On Windows it's
196-
still opt-in — enable it when creating the sandbox:
197-
198-
```console
199-
$ DOCKER_SANDBOXES_ENABLE_VIRTIOFS_CACHE=1 sbx run <template>
200-
```
201-
202-
The setting is persisted in the sandbox spec and applies for the lifetime of
203-
that sandbox. If you experience Git index corruption or unexpected file content,
204-
disable caching with the kill switch and recreate the sandbox:
195+
Virtiofs caching is enabled by default on all operating systems. If you
196+
experience Git index corruption or unexpected file content, disable caching
197+
with the kill switch and recreate the sandbox:
205198

206199
```console
207200
$ DOCKER_SANDBOXES_ENABLE_VIRTIOFS_CACHE=0 sbx run <template>

0 commit comments

Comments
 (0)