Skip to content
Runtime

Shared vs reserved CPU what is the difference?

Shared CPU guarantees a machine a small slice of a core, and lets it burst. Reserved CPU keeps every one of its vCPUs for that machine alone.

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.

Facts on this page were checked on 25 October 2026.

100 free hoursin your first 30 days.

of a 1 GB machine

  • No credit card
  • Four sandboxes at once, 2 vCPU and 4 GiB each
  • Then prepaid credit from $10, no plan fee
Start free, no card
Start free, no card