Kimi K3.1 Pro on Sail: as low as $0.70 input, $0.10 cached input, and $6 output per million tokens.
Blog
Sailboxes moving along a conveyor

Giving agents unlimited compute

Today’s AI applications are incredibly CPU hungry. Some of the most ambitious agentic work happening today — from large agent swarms to RL rollouts and evals — are highly parallel and practically always compute bound. Most CPU sandbox providers are unable to run these workloads at any meaningful scale, and the ones that can force users to pay massive amounts of money.

We designed Sailboxes to give everyone near-unlimited compute at a fraction of the cost. Unlike other providers, users can get massive machines (64 vCPUs + TBs of memory) and huge amounts of concurrency (10k vCPUs) entirely self-serve, with some of our biggest customers routinely scheduling >100k CPUs at a time. To give users unrestricted access to this much compute, we made several core architectural decisions.

Building on Unreliable Compute

Sailboxes are built entirely on spot compute. There are a number of advantages to using spot — it’s a lot cheaper (up to 90%!) than reserved capacity and lets us dynamically scale our fleet depending on customer load — but also comes with some huge challenges because nodes can be reclaimed at a moments notice. To enable spot, we’ve put in a bunch of work to live-migrate our sandboxes between hosts and have written in the past how we achieve this performantly at scale.

Using spot compute unlocks a huge amount of capacity for our users because it means we can spin up compute on the fly. Instead of having a large fleet of reserve hosts sitting idle waiting for traffic spikes, we can instead provision compute only for the periods of time customers actually need it. It also lets us participate in the numerous CPU arbitrage opportunities out there: as capacity increases in new regions or providers, we can seamlessly migrate workloads without being locked into a single set of hosts.

As an added benefit, using spot capacity gives us a number of other elegant properties. It is what allows us to do active-everything billing — we only ever charge you for the CPU, memory, and disk you actually use per-second — and counter-intuitively also makes us more reliable because we have to design every part of our system assuming that a host could fail at any moment.

Using Heterogenous Compute

We have a motto at Sail: there are no bad chips, only bad prices. For both our inference endpoint and Sailboxes, we run our services across every type of hardware possible so that we can give customers both the most abundant and economic compute possible. To this end, Sailboxes actively run across multiple CPU generations and microarchitectures.

The difficulty in using heterogenous compute lies in live-migrations, which are necessary for us to use spot compute. A VM’s memory snapshot records the exact CPU the guest booted on, including its instruction set and address widths. Restoring a memory snapshot from a newer chip to an older chip can therefore lead to crashes because the guest may attempt to use an instruction the older host doesn’t have. We get around this by booting every Sailbox with a custom CPU template which hides some of the features that older chips don’t share. This ensures that every VM sees the same virtual CPU and can migrate across all hosts.

While there are performance considerations involved when using older generations of hardware, we find that single-core CPU performance is not dramatically different over our fleet (for chips over the last five years, the performance delta when running gcc compile is ~30%). In any case, we’ve done a lot of engineering work to mitigate the effects of slower hardware, such as pinning VMs to NUMA nodes and replacing the default Linux NUMA balancer with our own.

Efficient Scheduling

Even though heterogenous spot compute gives us access to massive pools of capacity, we still need to think heavily about scheduling to ensure we can get as many Sailboxes onto them as possible. Sandbox scheduling is a fascinating topic (so many potential tradeoffs to consider!) that warrants a post of its own but, at a high level, we schedule Sailboxes entirely by their live usage. As a host becomes more constrained, we live-migrate a subset of its sandboxes to ensure we evenly balance load across our entire fleet. During this process, our scheduler accounts for factors such as image locality to ensure high throughput.

Scheduling based on live-usage allows us to get an extremely high density of VMs per host, translating to more capacity available for users. It is also what makes our active-everything billing model sustainable: if your sandbox isn’t using resources, it also isn’t preventing other sandboxes from running on the same host. Finally, it allows us to support much bigger sandboxes than other providers (64 vCPUs + TBs of memory) because we can migrate your workload as it uses up more of its reservation.

The Result

All of this engineering work has allowed us to sustainably give every user massive amounts of compute entirely self-serve and we spin up ~millions of CPUs cumulatively every day. Combined with our active-only billing model, we’ve had thousands of agent workloads run for months at >70% cheaper than other providers.

If you’re feeling compute constrained, try Sailboxes out today or contact us at our Slack community for higher limits!

Back to blog