# What is a CPU floor? A CPU floor is the share of a processor a machine is guaranteed when it shares cores, and the least CPU it is billed for while idle. **Runtime's default floor is 50 millicores, a twentieth of a vCPU, which costs $0.00125 an hour.** That is why a 2 vCPU, 4 GiB sandbox waiting on a model costs $0.03125 an hour, memory plus the floor, and not the price of two whole cores ([pricing](/docs/pricing)). ## Why it matters for AI agents An agent's sandbox spends most of its life waiting: for the model to answer, for a person to reply, for the next tool call. Providers that bill every allocated vCPU charge full price for that wait. A provider that bills measured CPU still has to guarantee the machine something, or a busy neighbour could starve it. The floor is that guarantee, and it is also what you pay for when the sandbox does nothing. A small floor makes waiting cheap; a larger one buys steadier performance under contention. ## The floor in numbers `cpuFloorMillis` is set in thousandths of a vCPU. CPU costs $0.025 per vCPU-hour of measured use, so the floor's hourly price is the floor times that rate: | `cpuFloorMillis` | Share of one vCPU | Floor cost an hour | 2 vCPU, 4 GiB sandbox, idle | | ---------------: | ----------------- | -----------------: | --------------------------: | | 50 (default) | 1/20 | $0.00125 | $0.03125 | | 250 | 1/4 | $0.00625 | $0.03625 | | 500 | 1/2 | $0.0125 | $0.0425 | | 1,000 | 1 | $0.025 | $0.0550 | Memory adds $0.0075 per GiB-hour whatever the floor. Above the floor, the sandbox bursts up to its `vcpu` count and you pay for what it measures. ## Set a floor ```ts check import { Sandbox } from "withruntime"; await using sbx = await Sandbox.create({ funding: "paid", vcpu: 2, cpuFloorMillis: 500 }); console.log(sbx.info.cpu, sbx.info.cpuFloorMillis); // "shared" 500 ``` ```python check from withruntime import Runtime runtime = Runtime() with runtime.sandboxes.create(funding="paid", vcpu=2, cpu_floor_millis=500) as sbx: print(sbx.info["cpu"], sbx.info["cpuFloorMillis"]) ``` A fork or a snapshot copy keeps its source's floor, and is billed as a create with that floor would be. A trial copy must fit the trial, so a sandbox with a floor above 250 forks only onto paid credit ([snapshots and forks](/docs/javascript#snapshots-and-forks)). ## When to raise it - **Keep the default** for agents that mostly wait, and for short jobs whose measured CPU is well above the floor anyway: in the standard example of 60-second runs with 20 CPU-seconds of work, the floor adds nothing. - **Raise it** for a latency-sensitive server that must answer quickly even when the host is busy. - **Reserve every core** with `cpu: "reserved"` when the work needs whole vCPUs all the time; see [shared vs reserved CPU](/glossary/shared-vs-reserved-cpu). ## Related - [Shared vs reserved CPU](/glossary/shared-vs-reserved-cpu) - [The sandbox environment: disk, CPU and memory](/docs/sandbox-environment#disk-cpu-and-memory) - [Sandbox cost calculator](/calculators/sandbox-cost-calculator) - [What is a spending limit?](/glossary/spending-limit) Facts on this page were checked on 25 September 2026.