On Runtime, shared CPU bills only what the code measures. A 2 vCPU, 4 GiB
sandbox costs $0.03125 an hour while idle, and $0.08 an hour with
both cores busy. When a job needs its cores held for it at all times, set
cpu: "reserved". That gives the job reserved cores on the same sandbox
(pricing).
Why it matters for AI agents
Most agent sandboxes alternate between long waits and short bursts. The model thinks, and then the sandbox installs a package or runs the tests. Shared CPU fits that pattern. The machine pays for each burst, plus a small floor while it waits. A benchmark run, a build farm or a server with a latency target needs the opposite. It needs the same CPU on every run, whatever the neighbors do. The difference also matters when you compare providers. A shared CPU ceiling is not a reserved physical core. A fair benchmark compares like with like (choosing an agent sandbox).
Side by side on Runtime
| Question | cpu: "shared" (default) |
cpu: "reserved" |
|---|---|---|
| What is guaranteed | The floor, cpuFloorMillis, 50 millicores default |
Every vCPU the sandbox asks for |
| How far it can go | Bursts up to vcpu cores |
All vcpu cores, all the time |
| Billing while busy | $0.025 per vCPU-hour of measured CPU | The rate in the sandbox's quote |
| Billing while waiting | Memory plus the floor | Higher: reserved CPU raises the waiting charge |
| Without credit | Yes | Paid sandboxes; a reserved sandbox forks only to paid |
| Forks and snapshot copies | Keep the source's floor | Keep reserved CPU |
| Fits | Agents, chat code runs, CI steps, evals | Benchmarks, steady servers, latency targets |
The exact rate of each sandbox is fixed in its usage-pricing quote when the
sandbox is created. GET /v1/usage shows the rate. Memory costs
$0.0075 per GiB-hour either way.
Choose one at create
TypeScriptimport { Sandbox } from "withruntime";await using bench = await Sandbox.create({ vcpu: 4, cpu: "reserved" });const run = await bench.exec("nproc");console.log(bench.info.cpu, run.stdout.trim()); // "reserved" "4"Pythonfrom withruntime import Runtimeruntime = Runtime()with runtime.sandboxes.create(vcpu=4, cpu="reserved") as bench: print(bench.info["cpu"], bench.exec("nproc").stdout.strip())Leave cpu out to use shared CPU. A middle path is a shared sandbox with a
raised floor. For example, you can guarantee half a core and still bill bursts
on measurement (CPU floor).
How other providers name it
On Fly Machines, performance vCPUs are whole cores kept for the Machine. A
shared-cpu-2x Machine's vCPUs are guaranteed 6.25% of a core each, with a
small burst allowance. This is from Runtime's Fly comparison,
which records Fly's pricing, checked 25 October 2026. E2B and Daytona bill
every allocated vCPU, whether it is busy or not.
Related
- What is a CPU floor?
- The sandbox environment: disk, CPU and memory
- Fly Machines vs Fly Sprites
- Sandbox cost calculator
Facts on this page were checked on 25 October 2026.