Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Modal 7 min read Announcement mediumAdept

Unpacking sandbox startup latency: why started ≠ ready

Container scheduling and boot time, the figure most sandbox benchmarks measure as time to interactive, is usually the smallest part of startup latency. The gap between a sandbox being Started and being Ready (git clone, npm install, servers coming up) often runs to multiple seconds or more. Modal recommends warm sandbox pools backed by a modal.Queue to take that setup cost off the user's critical path, with Directory Snapshots to mount per-project state into generic pre-warmed sandboxes. The newly GA Readiness Probes, either a TCP port or an exec command checked via wait_until_ready(), replace fixed sleeps and custom health checks and add a ready event to the dashboard timeline.

Related posts

  • Scaling to 1 million concurrent sandboxes in seconds

    Modal mediumAdept

    Modal rebuilt its sandbox control plane to run 1 million concurrent sandboxes, creating all of them in under a minute, by removing central coordination and durable stores from the creation path. A horizontally scaled fleet of scheduling servers picks workers using in-memory state that workers publish to a Redis stream, then calls the worker directly over RPC; workers act as their own source of truth and reject requests when full. Kubernetes and Modal's old Postgres-backed design hit limits from O(pods) and O(nodes) etcd and Postgres writes and serialized scheduling. The new path takes two network hops, scheduling takes tens of milliseconds, and median start time is under 0.5s, with tail latency driven by kernel rtnl lock contention during container networking setup.

  • How Ramp built a full context background coding agent on Modal

    Modal easyNovice

    Ramp Inspect, an internal background coding agent, runs each session in a Modal Sandbox containing a full dev environment (Postgres, Redis, Temporal, RabbitMQ, OpenCode, VS Code server, VNC with Chromium) and now starts roughly half of merged pull requests at Ramp. Fast startup comes from a cron job that clones repos, installs dependencies and builds every 30 minutes, saving diff-based filesystem snapshots so sessions begin from a near-current state in seconds. Modal Dicts handle session locks and image metadata, and Queues route prompts from Slack, web and Chrome extension clients into shared multiplayer sessions, letting the system scale to hundreds of concurrent isolated sessions.

  • How Abundant designed efficient rollout architecture with Modal Sandboxes

    Modal easyNovice

    Abundant runs its reinforcement learning rollout platform on Modal, with each of 75,000+ RL tasks executing in an isolated Modal Sandbox and Modal Functions powering the scheduler API. The design places a small monitor inside each Sandbox that sends heartbeats every 30 seconds, live events and final results over HTTP. The control plane retries three times before terminating a silent Sandbox. CPU and memory bursting let them request average rather than peak resources, cutting idle compute spend and avoiding OOMs. To counter evaluation awareness, they delete task instructions before work starts and add a reviewer agent that flags suspicious traces during verification.

  • Directory Snapshots: Resumable project state for Sandboxes

    Modal mediumAdept

    Modal's Directory Snapshots, now in public beta, capture a single directory from a running Sandbox and mount it into another Sandbox independently of the base image, instead of snapshotting the whole filesystem as one unit. This lets project state evolve separately from system dependencies, so base images can be patched without rebuilding project snapshots, and generic warm-pool Sandboxes can receive project code at claim time. Snapshots mount instantly and their contents are prioritized by Modal's lazy-loading filesystem. They persist for 30 days after last use and sit alongside full filesystem snapshots and memory snapshots.

  • NVIDIA Vera CPUs double throughput for Modal Sandboxes

    Modal mediumAdept

    Modal benchmarked NVIDIA's Arm-based Vera CPU for its multi-tenant Sandbox workloads and found up to 2x task throughput versus a comparable Intel Granite Rapids x86 host under heavy concurrent load. Individual task latency stayed equal or lower, whereas competing CPUs hit throughput plateaus as contention rose. On a quiet host, serial latency was only marginally better than Graviton 4/5, AMD Zen 5 and Intel GNR. The tests used an internal suite called Agentless Agent Bench: 50 Terminal-Bench oracle solutions run in concurrent prewarmed Docker containers without network calls. Modal attributes Vera's behaviour under contention to its high memory bandwidth, which allows denser packing and more forgiving burst capacity for spiky agent and RL rollout workloads.

The quest for software engineering knowledge.

Look:
Layout: