AI agent sandbox benchmark study 2026: 74 ms restore, 100 forks in 2.5 s, 192/192 refused

2026-12-03来源 dev.toEnglish

How fast can an AI agent get a sandbox with its own kernel, and does tenant isolation hold under load? On one AMD Ryzen 7 7700 server on 3 November 2026, kosa8 restored a microVM from a snapshot in 74 ms at the median, forked 100 live copies of a running sandbox in 2.5 s with none lost, created a sandbox from its warm pool in 1.9 ms, and refused 192 of 192 cross-organisation access attempts with 64 clients running. These are kosa8's own measurements of kosa8, on one machine per test. The method, the limits and the full dataset (CSV and JSON) are below.

Key findings

  • 74 ms — restore a microVM from snapshot, median
  • 2.5 s — fork 100 live copies, 0 dead
  • 1.9 ms — create from the warm pool, median
  • 192/192 — cross-org attempts refused, 64 clients

Linux engine, one AMD Ryzen 7 7700 server, sandboxes of 1 vCPU and 256 MiB, 2026-11-03.

  1. Per-task virtual machines are fast enough for interactive agents. A sandbox with its own kernel was ready in 1.9 ms from a warm pool and in 74 ms from a snapshot, against 287 ms for a cold boot. Start-up is no longer a reason to share a kernel between tasks.

  2. Forking a running machine is cheap in time and disk, not in memory. A hundred live copies took 2,471 ms and wrote 28 MB to disk, because reflink shares the rest, but held 26 GB of host RAM, about 260 MB each.

  3. Isolation held under load. Every attempt by one organisation to run a command in another's sandbox was refused: 80 of 80 at 20 clients and 192 of 192 at 64 clients, with no errors and no leaked VMs.

  4. One 8-core host saturates at about 26 operations a second. Past that, extra clients add queueing, not work. When the pool drained under load, a create fell back to a restore that took 2.6 s at the median instead of 74 ms, so pool depth has to follow demand.

  5. Shared folders are the slow path. On a Mac, a virtiofs bind mount reached 30% of host-native throughput, below the VM's own disk at 52%. Heavy I/O belongs on the sandbox's own disk.

Time to a running sandbox

Measure Result Gate
Cold sandbox boot (no pool) 287 ms p50
Container in a running sandbox 56 ms p50
Snapshot (256 MiB guest) 32 ms
Restore 74 ms p50, 83 ms max ≤ 300 ms: pass
Restore to first container exec 142 ms p50
Claim from the warm pool 1.9 ms (n=17, max 2.5 ms)
First container exec after a pool create 71 ms

Forking a running sandbox

Measure Result Gate
Fork n=10 328 ms (33 ms per clone), 0 dead
Fork n=100 2471 ms (25 ms per clone), 0 dead ≤ 5000 ms: pass
Host RAM for 100 forks 26 GB (~260 MB each)
Disk written by 100 forks 28 MB (reflink shares the rest)

A fork copies a running sandbox, with its memory and processes, into live copies. Every clone ran a container afterwards.

Concurrency and tenant isolation

Each client loops: create, exec, have another organisation try to exec (it must be refused), delete, call a function.

1 client 20 clients, 4 orgs 64 clients, 8 orgs
Create from pool 2.0 ms 6.4 ms 14.7 ms
Create, pool drained (restore) 2.6 s p50
Exec 76 ms 264 ms 424 ms
Python function, end to end 170 ms 805 ms 1.5 s
Node function, end to end 192 ms 939 ms 1.7 s
Throughput (creates + invokes) 27/s 26/s
Cross-org attempts refused 80/80 192/192

Held at once: 150 sandboxes running simultaneously from 10 orgs, created in 2.8 s at 16 in parallel, each answering correctly while all were up. A refused cross-org attempt is a request with one organisation's token for another organisation's sandbox; the host API must answer it with 404 (not found).

A pool that follows demand

The pool sizes itself from the recent claim rate, the measured refill time and the largest recent burst, and gives memory back after a quiet minute.

Load Creates from the pool Pool create p50 Errors
6 clients, 2 orgs (rate only) 133 / 150 2.1 ms none
6 clients, 2 orgs (rate + burst) 146 / 150 2.1 ms none
64 clients, 4 orgs 63 / 512 4.1 ms none

Below saturation the pool absorbs the load. At saturation no pool depth helps, because refills cannot keep up; that is host capacity, and the answer is more hosts.

Mac baseline

2026-09-20. Apple M-series, macOS 26.0.1, the local engine on Apple's Virtualization.framework. One target is missed, and it is listed.

Target Measured Verdict
Idle footprint ≤ 400 MB 46 MB pass
First run after install ≤ 60 s 2.1 s pass
Container cold start ≤ 250 ms 166 ms (median of 5) pass
Bind-mount I/O ≥ 70% of native 30% of host native miss
Snapshot 2 GB sandbox ≤ 2000 ms 1528 ms pass
Warm restore ≤ 1000 ms 657 ms (median of 3) pass

The VM's own block device reached 52% of host native on the same run, so no shared-folder mechanism can reach the 70% target on this platform; a workspace on the sandbox's own disk runs at that ceiling instead.

Methodology

  • Linux host. A bare-metal AMD Ryzen 7 7700 server (8 cores, 16 threads), 64 GB DDR5, sandbox state on XFS with reflink on its own NVMe, Ubuntu 24.04 (kernel 6.8), Cloud Hypervisor v53.0. Sandboxes of 1 vCPU and 256 MiB.
  • Restore and fork were timed by kosa8's Linux fork harness (bench/linux-fork.sh). Each fork run counted dead clones and ran a container in every clone afterwards.
  • Warm pool and load were timed through the host API that kosa8's control plane calls, with the token check, state write and resume included. Template base (Alpine), pool depth 5 for the pool test; for the load test, pools of 20 base, 10 Python and 10 Node sandboxes.
  • Load test. A load tester drove the host API with signed tokens for several organisations at once. Each client created a sandbox, ran a command, had another organisation try to run a command in it, deleted it, then called a Python or Node function in a fresh VM that is discarded after the call.
  • Statistics. Medians (p50), not best runs, with maxima where recorded. On the Mac, cold start is a median of 5 and warm restore a median of 3, because single samples flapped across the threshold. I/O comparisons write with conv=fsync on both sides, so they measure durable writes, not the page cache. Idle footprint sums resident memory for the daemon and guest helpers.
  • Go/no-go gates for the run: restore at most 300 ms and fork n=100 at most 5,000 ms. Both passed.

Limitations

  • These are kosa8's own measurements of kosa8, not an independent study.
  • Each table is one machine. Re-run on your target hardware before relying on a figure.
  • No other product was measured. The study compares paths inside one system (cold boot, snapshot restore, warm pool), not vendors.
  • The load test is synthetic, from one tester, not customer traffic.
  • The harness source is not public. To run it on your own hardware, or to see the raw JSON, book a call or write to contact@kosa8.com.

Dataset

Every figure on this page, one row per measurement, with its unit, statistic, sample size where recorded, load, sandbox size, host and date.

Download the dataset: CSV · JSON

Column Meaning
section Which test: linux_restore_fork, warm_pool, concurrency_isolation, demand_pool or mac_baseline
metric What was measured
value, unit The result and its unit
statistic, n p50, max, median, total or count, and the sample size where recorded
load Concurrent clients and organisations, for the load tests
sandbox_vcpu, sandbox_mem_mib Sandbox size
host, date The machine and the day of the run
note Gate, verdict or context

Cite as: kosa8, AI agent sandbox benchmark study 2026, kosa8.com/research/ai-agent-sandbox-benchmarks-2026/, measurements of 20 September and 3 November 2026. The data is licensed under CC BY 4.0: reuse it with credit to kosa8 and a link to this page. The live benchmark page, with later end-to-end runs against kosa8 Cloud, is kosa8 benchmarks.

What it means for choosing isolation

The common objection to giving every agent task its own virtual machine was start-up time. On this hardware, a microVM with its own kernel was ready in 74 ms from a snapshot and in under 2 ms from a pool. The costs that remain are memory per instance and host capacity under load, and both are planning problems rather than reasons to share a kernel. The trade-offs between containers, gVisor and microVMs are set out in MicroVM vs container isolation for LLM code execution, and the wider design in Secure sandbox infrastructure for AI agent tool execution.

About kosa8

kosa8 is Zero Trust cybersecurity infrastructure for AI agents. Each agent runs in its own microVM with its own kernel; network egress goes to an allow-list enforced on the host; secrets stay outside the sandbox; risky steps can wait for a person; and every action goes to a hash-chained, signed audit log. It runs on your computer, on kosa8 Cloud (us-ash1, Dallas, Texas), on your own servers or air-gapped. SOC 2 Type II is in progress; there is no SOC 2 report and no external penetration test yet.

Try free with no account at kosa8.com/try. Starter is free with no card; plans from \$29 a month.

Questions

How fast does a microVM sandbox start?

In this study, on one AMD Ryzen 7 7700 server with sandboxes of 1 vCPU and 256 MiB, a cold boot took 287 ms at the median, a restore from a memory snapshot 74 ms, and a claim from a pool of paused, pre-restored microVMs 1.9 ms.

How much memory does forking a sandbox use?

A hundred live copies of one running 256 MiB sandbox used 26 GB of host RAM, about 260 MB each, but wrote only 28 MB to disk because reflink shares the unchanged blocks. Memory, not CPU, set how many sandboxes fit on the host.

How was tenant isolation tested?

A load tester ran clients for several organisations at once. Each client created a sandbox and then had another organisation try to run a command in it. All 80 attempts at 20 clients and all 192 attempts at 64 clients were refused, with no errors and no leaked VMs.

How should I cite this study?

Name kosa8's AI agent sandbox benchmark study 2026 and link this page. The CSV and JSON files carry every figure with its unit, statistic, load, host and date. They are kosa8's own measurements on one machine per test, not a comparison with other products.

This article was written with AI assistance and reviewed by the kosa8 team. It was first published at kosa8.com.

原文:https://www.a8q9.cn/en/article/ai-agent-sandbox-benchmark-study-2026-74-ms-restore-100-forks-in-2-5-s-192-192-r-b9dda0.html

相关文章