Skip to content

[release-1.0] Cherry-pick #3456: microvm: skip software bounce buffer (SWIOTLB) by default - #3515

Merged
Benjamin Elder (BenTheElder) merged 1 commit into
agent-substrate:release-1.0from
jiayimeow:cherry-pick-3456-release-1.0
Oct 31, 2026
Merged

Benjamin Elder (BenTheElder) merged 1 commit into
agent-substrate:release-1.0from
jiayimeow:cherry-pick-3456-release-1.0

Conversation

@jiayimeow

Copy link
Copy Markdown
Collaborator

Cherry-pick of #3456 onto release-1.0 (git cherry-pick -x of the squash commit), it applied cleanly with no changes.

Pass swiotlb=noforce on the microVM guest kernel command line to skip the 64 MiB software bounce buffer (SWIOTLB) reserved at boot on > 3 GiB VMs. Fixes #3444 for 1.0.

AI use: AI-assisted. Clean pick.

  • Tests pass

…trate#3456)

Pass
[`swiotlb=noforce`](https://docs.kernel.org/admin-guide/kernel-parameters.html)
on the microVM guest kernel command line to skip the 64 MiB software
bounce buffer
([`SWIOTLB`](https://docs.kernel.org/core-api/swiotlb.html)) reserved at
boot on `> 3 GiB` VMs (see agent-substrate#3444).

### Benchmark
The change itself is tiny, but it gives us solid improvements!

Having 64 MiB less uncompressed data in `memory-ranges` shrinks
snapshots and cuts lifecycle latencies.

To confirm this, here is a comparison against `main` on a `4 GiB`
[SWE-bench
workload](https://github.com/agent-substrate/substrate/blob/main/docs/guides/benchmarking.md#sweperf-benchmark):
- **Setup**: GKE 1.35, `c3-highmem-192-metal` (bare metal),
`hyperdisk-balanced` 200 GB
- **Workload**:
[`sweperf-astropy-7336`](https://github.com/agent-substrate/substrate/blob/main/benchmarking/workloads/manifests/sweperf/generated/sweperf-astropy-7336-template.yaml.tmpl)
(`2 vCPU / 4 GiB` RAM), cold start + 4 cycles of `Resume → Execute →
Suspend` (median of 4 cycles):

| Metric | `main` | With `swiotlb=noforce` | Delta |
| :--- | :---: | :---: | :---: |
| **Golden `memory-ranges` populated size** | `223 MiB` | **`158 MiB`**
| **`-64 MiB` (`-29%`)** |
| **Golden cold boot (`RunWorkload`)** | `491 ms` | **`416 ms`** |
**`-75 ms` (`-15%`)** |
| **Suspend (`async`, on node) — `Resume` / `Suspend`** | `360 ms` /
`383 ms` | **`314 ms` / `352 ms`** | **`-46 ms` / `-31 ms`** |
| **Suspend (`sync`, to GCS) — `Resume` / `Suspend`** | `365 ms` / `1843
ms` | **`341 ms` / `1652 ms`** | **`-24 ms` / `-191 ms`** |

Fixes agent-substrate#3444

AI use: AI-assisted for the benchmark.

- [x] Tests pass

Signed-off-by: Jiayi Bao <[email protected]>
(cherry picked from commit 6db0d3a)
Signed-off-by: Jiayi Bao <[email protected]>
@BenTheElder

Copy link
Copy Markdown
Collaborator

since this is a cherry-pick of a PR that already had the 2 freeze approvers, I'm merging it once tests pass.

@BenTheElder
Benjamin Elder (BenTheElder) merged commit 6e1640f into agent-substrate:release-1.0 Oct 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants