Papers · 2026 · Reading: 27 min, plus 6 in closed details.
Paper · arXiv technical report · arXiv 2609.22978

DeepSeek Elastic Compute (DSec): A Sandbox Infrastructure for Effective Agentic Training at Scale

Jialiang Huang (first author), Hongxuan Tang, Jingchang Chen, Yuxuan Liu and 126 more, with Mingxing Zhang, Liyue Zhang (corresponding), Panpan Huang and Wenfeng Liang: 131 authors, 16 of them marked as the DSec project developers
DeepSeek-AI, with Tsinghua University · 19 September 2026 (arXiv v1)

In one line: The sandbox layer under DeepSeek's agentic reinforcement learning, described in rare detail: four isolation levels behind one SDK, with self-reported production figures of about 3 million sandboxes a day and over 5,000 created per second on roughly 160 nodes per unit (no measurement method given). Its four storage, memory and CPU mechanisms are measured on a 10-node test cluster; the co-design that lets stateful rollouts survive preemptible GPU training is described but not evaluated.

Scoped on 26 October 2026 from the database Takeaway, which called it "published with production numbers for the first time" and stated the scale and the preemption co-design as results; the paper gives the scale without a trace or method, cites earlier reports that mention their execution environments, and excludes the RL co-design from its evaluation (§8). The Notion property needs the same edit.

How far to trust it: Believe the workload study and the four storage, memory and CPU mechanisms: their figures decode back to the text's numbers within a few percent. Treat the production scale as self-reported (no trace, no method) and the RL co-design, the paper's most original part, as described rather than measured: the evaluation leaves it out by design. The evidence, judged.

3 M sandboxes a day
one scale unit of about 160 nodes, 30K cores, 250 TB of DRAM
peak about 380K at once, over 5,000 created per second · §2.4
4.2 to 13.3% of an image
is all a sandbox reads at runtime
so images load on demand: 1.7× faster than eager pulls, 57% fewer disk writes · Table 3
45% → 17% latency inflation
of a latency-sensitive agent beside 50% best-effort load
SCHED_IDLE plus core scheduling; SCHED_IDLE alone barely helps · §8.5

The idea in one sentence: agentic RL needs tens of thousands of stateful, untrusted, mostly idle machines in bursts, so DSec offers four isolation levels behind one SDK and answers each measured property of that workload with a stock-Linux mechanism (images loaded on demand from the training cluster's own filesystem, composable layers, shared and returned memory, core-level CPU isolation); those four mechanisms are measured, while the scale figures are self-reported and the rollout-survives-preemption co-design is described, not evaluated.

You need: what an RL environment is (task, tools, sandbox, verifier, reward) and where rollouts run (Harnesses for training); containers against VMs at the level of "shared kernel or not". New terms: sandbox (one isolated machine for one rollout or evaluation task); FnCall (precreated containers for short stateless calls); microVM (a Firecracker VM: VM isolation, container-like start); libdsec (the Python SDK); edge (the per-node agent with final admission authority); 3FS (DeepSeek's distributed filesystem, shared with training); EROFS (a compressed read-only Linux filesystem); base, workspace, toolkit (the three layers of a sandbox image); LS and BE (latency-sensitive and best-effort sandboxes).

Each workload pressure forces one mechanism; four are measured, the RL co-design is not
Workload pressure (§1, §4)Mechanism (§5, §6)Effect (§8, 10-node test cluster)bursts of up to 32K; a taskreads 4.2 to 13.3% of its imageon-demand loading from 3FS(EROFS, metadata kept local)8,192 burst done in ~35 min,over 60 eager; 57% fewer writestoolkits change often, across102,171 workspaces a weekcomposable overlayfs layers:base + workspace + toolkitstar writes 5.5× the data and3.4× the peak rate of EROFS~90% use at most 5% of CPU;memory pinned (p99 life 3 h+)share one page cache (pmem)+ return free pages (DAMON)peak host memory −40.2%;time-integrated −21.2%latency-sensitive agents sharecores with best-effort workSCHED_IDLE for best effort+ core scheduling for LSlatency rise at 50% load:45.2% down to 17.3%GPU training jobs preemptedwhile rollouts are mid-flightrollout state lives on DSec;idle sandboxes are pausednot evaluated in the paper(excluded by design, §8)Production scale, as the authors report it (§2.4, no trace or method): about 3 M sandboxes a day,about 380K peak concurrent, over 5,000 created a second, about 160 CPU nodes per unit.
Read across a row: a property measured in production on the left, the mechanism it forces in the middle, the effect measured on the test cluster on the right. Notice the last row's dashed box: the part most specific to RL has no number. Pressures from §4 (the last from §1); mechanisms from §5 and §6; effects as printed in §8, each reproduced from the decoded figures in the figures tab. Redrawn for this page (the paper is under arXiv's non-exclusive licence); swipe sideways on a phone.

Problem

§1 Introduction

Agentic reinforcement learning trains a model by letting it act in a real environment: it reads a repository, calls tools, runs commands, inspects failures, edits files, and is rewarded from native execution signals such as exit codes, test pass rates or a task's own verifier (§1; RL environments in general: Harnesses for training). Each rollout and each evaluation task therefore needs an isolated, task-specific machine with its repository, dependencies, services, evaluation scripts and coding harness, close enough to a real computer to run unmodified package managers, build tools, browsers and emulators. Rollout and evaluation put the most pressure on that layer, because they are large, concurrent and tied to the training loop; asynchronous rollouts (as in DeepSeek's own pipeline) keep many stateful sessions in flight and may interrupt and resume them across policy updates or preemptions (§1).

The paper lists seven properties of this workload, and the whole design follows from them (§1):

PropertyWhat it means in productionWhat it forces
1. Burstyone job can ask for up to 32K sandboxes at oncehorizontal scaling, no central bottleneck in scheduling or image distribution
2. Densea sandbox mostly waits for the model's next action, so CPU use is sparse; one node hosts up to 800 microVMs or 3,200 containerssafe overcommit
3. Stateful and long-livedfiles, installed packages and started services persist across many turns; memory and page cache stay pinned after the CPU goes idlememory sharing and reclamation
4. Heterogeneousjudge-style scripts, whole repositories, security tasks, computer use, Android, full systemsmore than one kind of sandbox
5. Diverse imageseach task may need its own repository, versions, services or VM snapshot, with little reuse; eager pulling stretched completion 1.7× in their ablation, on-demand loading cut disk writes 57%scalable, on-demand image distribution
6. Untrustworthyagents corrupt filesystems, exhaust resources, interfere with system componentsfine-grained access control and misbehaviour analysis
7. InterruptibleGPU training jobs are preempted while long rollouts are in progressstate preservation and efficient recovery

The question: what does a sandbox platform need to be, so that a frontier lab can create millions of stateful, untrusted, heterogeneous environments a day at the rate a GPU cluster consumes them, and keep them alive through preemptions?

Idea: one SDK, four backends, the caller chooses

§2 Overview, Table 1

DSec's answer is an elastic platform rather than a single sandbox runtime. Callers (the training framework, evaluation frameworks and data-construction pipelines) reach it through libdsec, a Python client: a request names the sandbox type, the image or environment, CPU and memory limits, lifetime, network rules and initial user; the caller then runs shell commands or tool calls and reads outputs and exit status (§2.1). The paper's minimal session asks for a container with 4 GB, 4 cores, a 300-second idle timeout and network rules that allow PyPI but deny npm, runs echo hello world and stops it (§2.1).

The paper's minimal libdsec session, condensed
client = DSecClient(); await client.open() args = DSecContainerRunArgs(container_image="registry.../sphinx-9658:official", memory_limit_mb=4096, cpu_cores_limit=4, ttl_running_stop=300, # idle timeout network_rules={"npm": False, "pypi": True}, init_user="root") sandbox = await client.run_container(args, timeout=120) result = await sandbox.run_shell("echo hello world"); await sandbox.stop()
The paper's minimal libdsec session, condensed from its listing in §2.1.

The SDK is deliberately not a full abstraction over its backends. Stronger isolation and fuller system functionality cost startup latency and resources, and no single sandbox fits every agentic task, so DSec offers four points on that trade-off and the caller stays responsible for picking the one that matches the task (§2.1, §2.2):

Table 1FnCallContainerMicroVMFull VM

Typical workload fit, transcribed from Table 1 ("more ● = higher demand"; the microVM's runtime performance is printed as ●◐○). Pick a scenario to see which column it falls in:

  • FnCall runs short, stateless work (judge-style programs, compilation, serverless code, GPU kernels) in reusable, precreated CPU or GPU containers, so there is no per-call provisioning; GPUs are shared for light work or reserved exclusively for performance-sensitive operator evaluation (§2.2).
  • Containers are the main backend for software engineering and general tool use: fast start, dense packing, the Linux stacks most repository tasks use, but they share the host kernel (§2.2).
  • Firecracker microVMs give a VM boundary with Linux compatibility for security-sensitive tasks, at more memory and slower start (§2.2).
  • Full VMs (for example Android through QEMU) cover tasks that need a complete off-the-shelf operating system, a GUI or graphics rendering (§2.2).

In production, containers and microVMs dominate both instance count and resource use; FnCall serves many light invocations with a few resident environments; full VMs cover specialised but important classes (§2.2). Whatever the backend, the user sees one lifecycle: create (backend, environment artefact, limits, lifetime, network policy), let the platform prepare it, interact (commands, tool calls, tests), then stop it or let its time-to-live reclaim it. The artefact is a base image plus task workspace and toolkit layers for containers and microVMs, a prepared image or snapshot for full VMs, and a task specification for FnCall (§2.3).

The scale of one production unit: nearly 160 CPU nodes with 30K cores and about 250 TB of DRAM, petabytes of layers and images, about 3 M sandboxes on a typical day, peak concurrency about 380K and creation above 5,000 a second; several such units share one 3FS deployment for base images and workspaces (§2.4).

At peak DSec creates more than 5,000 sandboxes a second. On a typical day it serves about 3 million. What is the average creation rate over that day?

Fig. 1 · one request, from libdsec to a shell

Architecture: the path of one request

§3 Platform Architecture, Figure 1

A creation request passes cluster-level services first, then the per-node runtime. Placement uses power-of-k choices with each engine's own recent placements overlaid on a periodic fleet snapshot, and the node's edge keeps the final say (§3.1, §3.2, §7, Figure 1). Fig. 1 follows one request; the second mode shows FnCall's separate path. Components and their order are the paper's; the four nodes drawn, the sandboxes already on them and which two are sampled are illustrative.

  1. libdsec sends a create request. Training code on a trusted GPU server asks for a sandbox: backend, image or environment, CPU and memory limits, lifetime, network rules (§2.1).
  2. IAM authenticates and authorises. Every management request passes IAM: is this principal allowed to create here, and is it within its project's (possibly delegated) quota?
  3. The placement engine picks a node. Filter to healthy nodes with the right backend and hardware, sample a few at random, take the least loaded in the watcher's view plus this engine's own recent placements. Here k = 2: of the two sampled nodes, running 5 and 3 sandboxes, the one with 3 wins.
  4. The apiserver forwards to that node's edge. The ingress keeps no per-sandbox state; the sandbox ID will encode its edge, so any apiserver instance can route later requests.
  5. The edge admits, or refuses. The edge checks its own capacity (refusing sends the request to another node), provisions storage with EROFS metadata local, applies the eBPF network policy and launches the runtime.
  6. The image loads on demand. No full pull: the sandbox starts at once and file data is fetched from 3FS as it is read; writes go to the node's local disk.
  7. Commands reach a shell session. Each command goes apiserver, edge, aether (the per-sandbox proxy, over a Unix socket or vsock), then a chronus shell session; output streams back the same way.
  8. Stop, or time-to-live. The caller stops the sandbox, or its time-to-live reclaims it; the edge releases storage and memory.
Each component in detail (§3.2 to §3.4, §7)
  • IAM authenticates every management request. Projects scope resources and access; unlike the flat or two-level hierarchies of cloud platforms, projects nest to any depth, and an authorised principal, an agent or harness included, can create a subproject, delegate part of its quota and grant permissions it holds, never more than its parent's. Humans and agents use the same management API (§3.2).
  • The apiserver is the only path between the trusted GPU servers (where training code calls libdsec) and the network-isolated sandboxes, which run untrusted code and may reach external networks. Creation, commands and streaming I/O all pass through it. It keeps no per-sandbox state: each sandbox ID encodes its owning edge, so any instance can forward any request and the tier scales horizontally (§3.2).
  • The placement engine filters to healthy nodes with the right backend and hardware (a GPU sandbox only to GPU nodes), then samples a few eligible nodes at random and takes the least loaded: the power-of-k-choices algorithm. Each instance overlays its own recent placements on the last snapshot, so in-flight load counts without coordination between instances. The watcher probes edges and hosts and counts running sandboxes per backend, edge, user and task. Neither needs durable state, so instances are easy to add or replace (§3.2, §7). The Place a burst tab runs this algorithm.
  • The edge, one per node, keeps final admission authority: it checks local capacity and rejects if short (the placement engine then picks another node), provisions storage, applies the eBPF network policy and launches the runtime; it also coordinates disk and memory snapshots and frees resources at stop or time-to-live. FnCall and containers run inside QEMU/libvirt VMs rather than on the host, an extra kernel and network boundary; full VMs use para-virtualised GPUs (virtio-gpu) and translation layers such as DXVK for graphics (§3.3).
  • aether is a per-sandbox proxy talking to the edge over a Unix socket (containers) or vsock (VMs); the edge marks the sandbox failed if that channel closes. chronus instances are shell sessions inside the sandbox (commands, filesystem, HTTP, streaming I/O), one per terminal session (§3.3).
  • Storage: container images are converted offline from OCI to EROFS with metadata kept local and data in 3FS; microVM disks use OverlayBD over the same store; both load on demand and snapshot incrementally over a shared base (§3.3).
  • Cloud bursting: above 80% on-premise utilisation, the placement engine offloads eligible container requests to cloud VMs running the same container runtime and EROFS path from a cloud filesystem. A de-duplicated 30 TB image set covers the files accessed by 70% of container tasks; tasks entirely inside it are cloud-eligible. In one scale unit 200 cloud VMs absorb about 30% of peak overflow (§3.4).

Reliability is engineered rather than measured: auxiliary services (API gateways, package mirrors) and the control-plane ingress sit behind a BGP-announced virtual IP with ECMP routing, so a dead instance loses its route within seconds; placement, watcher and IAM run as several independent instances, and regular cluster resets check that the Infrastructure-as-Code configuration can rebuild every cluster-level service from scratch (§7).

The workload, measured

§4 Production Workloads, Figures 2 to 8, Tables 2 and 3

Section 4 characterises one week of production in early 2026, for containers and microVMs only (together most instances and resources) (§4). Every number below is printed in the paper; the curves are rebuilt from the figures' vector data in the figures tab.

  • Bursts. A typical container task creates thousands of sandboxes (median 2,528, p90 7,969, p99 16,388; microVM tasks 352, 1,835 and 4,044), the largest jobs up to 32K, all within a short window because a batch cannot use an instance until its environment is ready; setup cost is multiplied by burst size and stragglers in any stage delay useful work (§4.1, Figure 2).
  • Three phases. Setup prepares dependencies and tools; the tool-call phase alternates model generation with short CPU bursts; a test phase verifies the result and briefly raises demand again. CPU is intermittent after setup while memory and accumulated state persist (§4.1, Figure 3).
  • Sparse CPU. About 90% of container and microVM sandboxes use no more than 5% of their requested CPU on average (Figure 5). One node peaked at 1,048 containers and 524 microVMs in a day's sample (Figure 6); across production DSec has run stably at 3,200 containers or 800 microVMs per node, "demonstrated operating points rather than hard limits" (§4.3).
  • Long lives. Median lifetimes are 17.4 minutes (containers) and 15.5 (microVMs); p99 exceeds three hours for both (231.5 and 213.9 minutes are printed on the figure) (Figure 7).
  • Many images, little reuse. In one week the container backend served 11,266 base images and 102,171 workspaces, the microVM backend 2 base images and 53,590 workspaces (plus 4,889 snapshots), with 103 toolkits; 67.8% of sandboxes needed at least one workspace or toolkit on top of the base. That is 82.8 TB plus 50.9 TB, more than 130 TB, far beyond one node (§4.2, Table 2). Per task, a container image is used by a median of 3 sandboxes (p90 28), a microVM image by 1 (p90 3), so node-local caches barely help (Figure 8).

Three pressures follow, and section 5 answers each: setup that must not scale with per-sandbox extraction; density that is valuable but unsafe without care for memory and latency; and a huge, low-reuse image corpus that makes eager distribution expensive (§5, Figure 9).

Mechanisms

§5 Core System Mechanisms
Upgrade one toolkit, T1; image count to scale with Table 2.

The redrawing follows Figure 4. The share is illustrative (the paper does not say how many images carry a given toolkit); the 102,171 workspaces are Table 2's week. Each square stands for 1,000 workspace images.

1. Composable environment layers

A sandbox is three parts with separate lives: a base image (OS-level dependencies such as Ubuntu, Python 3.10 or Java 8), a workspace (the task's repository and its dependencies) and frequently updated toolkits (such as the DeepSeek Harness) (§4.2). Fused into one OCI image, they multiply: with M bases, N workspaces and K toolkits, upgrading m bases costs O(m·N) rebuilds and upgrading k toolkits O(k·N). Unpacking workspace and toolkit archives inside each sandbox instead costs CPU and I/O across a burst and causes startup timeouts; bind-mounting read-only directories replaces paths rather than merging into them, and breaks tools that write into their own tree (Python's __pycache__) (§4.2).

DSec stacks them as overlayfs layers at creation time: base at the bottom, the workspace as a read-only layer above, each toolkit on top, and a writable upper directory that absorbs runtime writes. A 30-line Go change to dockerd inserts the pre-mounted EROFS layers into the lower-directory stack. Upgrading m bases now rebuilds m layers, and k toolkits k layers (§5.1, §7). The layers are immutable, so they are stored in EROFS, a compact read-only filesystem that can decompress only the blocks a read touches, unlike a tar.gz that must be streamed and unpacked whole (§5.1). MicroVMs get the same model: EROFS images as read-only block devices, overlayfs inside the guest with an ext4 upper layer (§5.1).

  1. Toolkit T1 has a new version. Bases, workspaces and toolkits are separate, independently versioned EROFS layers.
  2. Rebuild one layer. Only the T1 layer is rebuilt and published. Nothing else changes.
  3. The next sandbox composes it. At creation the modified dockerd stacks base (bottom), workspace, then T1 v2 on top as overlayfs lower layers, with a writable upper layer for runtime writes.
  4. Upgrading k toolkits costs O(k). Workspaces are untouched however many embed T1: the O(k·N) rebuild of the monolithic scheme becomes O(k) (§5.1).

2. On-demand image loading from 3FS

Sandboxes read only a small part of their images: 4.2% to 13.3% of the data in sampled container images (Table 3). Pre-warming only moves the cost earlier, and under overcommit, pulling and unpacking full images steals CPU and I/O from running sandboxes (§4.4). So on-demand loading shrinks total I/O in proportion to what is used, not just its timing (§5.3).

A sampled Java task image is 12.1 GB. How much of its file data does the task read while it runs?

Rather than a registry plus peer-to-peer delivery, DSec serves images from 3FS, the distributed filesystem its training already uses. 3FS is fast for large sequential I/O and poor at small random I/O, which sets three rules: writes stay local (the writable layer on the node's disk), reads are on demand and in bulk, and metadata is kept local where the format allows (§5.3). For containers, EROFS's multi-device mode separates metadata from data: the metadata is downloaded to local disk, file data stays in 3FS and is read through the page cache with kernel readahead, close to Nydus's design but without a registry or FUSE backend. Consecutive layers under a size threshold (for example 3 GB) are collapsed offline into one metadata and one data image, keeping overlayfs whiteouts, and file-backed mounts skip the loop device (§5.3).

The microVM storage path (OverlayBD over ublk) and the 3FS hardware

MicroVMs need a different path: Docker's overlay2 cannot sit on an overlayfs data directory, and Firecracker does not support virtio-fs. Read-only layers still use EROFS, while writable ext4 disks (including one mounted at Docker's data root for Docker-in-microVM) are OverlayBD images exposed through ublk; because ext4 metadata lives inside the block image, the ublk path fetches 256 KiB chunks and keeps them in a second-level local cache, so a chunk evicted from the page cache is not fetched from 3FS again (§5.3). This Rust OverlayBD and ublk code is the part the authors released (§7). Each 3FS storage server has 20 × 15 TB SSDs and 2 × 400 Gbps RDMA NICs; tens of them serve a cluster of hundreds of thousands of CPU cores through 3FS's FUSE client (§7).

3. Memory: share the page cache, return free pages

MicroVMs waste memory twice: image data read through a virtual block device is cached by the host and again by every guest, and a guest does not return free pages to the host unless told to; requested memory usually exceeds demand, so guests feel little pressure to reclaim, and long lifetimes make retained memory expensive (§4.3). DSec uses two complementary fixes (§5.2):

  • virtio-pmem with DAX maps file reads straight onto host pages, so co-located microVMs share one host page-cache copy. Its costs: a cold access may need synchronous fault handling (the buffered virtio-blk path gets guest readahead and batched I/O instead), and the guest must hold struct page metadata for the whole device, 64 bytes per 4 KiB page, so 1/64 of capacity: a 128 GB pmem device needs 2 GB of guest RAM.
  • DAMON plus balloon free-page reporting. The virtio-balloon driver reports free guest pages to the host, which drops them with madvise(MADV_DONTNEED), but by default only in order-9 blocks (2 MiB of 4 KiB pages). DAMON samples page-access bits, evicts file pages left untouched beyond an age threshold, and so frees scattered pages that coalesce into blocks large enough to report.

In production DSec enables pmem with DAX for the read-only EROFS base and toolkit layers and DAMON with free-page reporting for larger writable disks; all of it is Firecracker device configuration, guest kernel parameters and sysfs tuning, with no kernel modifications (§5.2, §7).

4. CPU: keep best-effort work off a latency-sensitive core

Some tasks have strict per-step budgets, such as a game-playing agent with a fixed time per move. Lowering best-effort (BE) priority is not enough, because a latency-sensitive (LS) thread and a BE thread on sibling hyperthreads still share the core's execution resources (§4.3). DSec puts BE sandboxes under SCHED_IDLE, so they yield whenever LS work is runnable, and turns on Linux core scheduling (prctl(PR_SCHED_CORE)) for LS sandboxes so unrelated BE work never runs on the sibling thread of the same physical core (§5.2, §7).

A latency-sensitive chess agent shares nodes with best-effort load at 50% of capacity, and its per-step time rises 45%. Putting the best-effort work at SCHED_IDLE priority alone removes how much of that rise?
Other implementation details: GPU FnCall

GPU FnCall for operator benchmarking uses NVIDIA Multi-Instance GPU partitions for isolated concurrent benchmarks, compiles on CPU FnCall first so GPUs are not held during compilation, and keeps a warm pool of Python processes with libraries already imported; a shared-GPU mode raises concurrency for work that is not performance-sensitive (§7).

One rollout through a preemption; an illustrative scenario built from §6.2 and §6.3.

The six-turn rollout and the memory bar are illustrative; the components, what each holds, and what happens at preemption, pause and resume are the paper's. The paper does not say whether earlier pipelines also paused sandboxes; this animation shows only what it describes. None of this is measured in the paper: section 8 states that the framework integration is outside its evaluation (§8).

Co-design with the RL framework

§6 Co-design with the RL framework

DSec has served every sandbox workload of DeepSeek's RL training and evaluation from DeepSeek-V3.2 to V4.1 (§6). Three pieces of co-design go beyond running sandboxes efficiently.

Environments built by agents. Hand-building the environments agentic RL needs is impractical, so agents build them interactively on the same infrastructure. pack_diff checkpoints a live sandbox as an incremental disk snapshot that can be restored as a new sandbox, turning a session into a reusable environment with no separate image pipeline. Builders follow internal packing rules (given to them as instructions) that limit runtime impact; an internal platform quality-checks agent-built environments and exports them in standard formats. Builders and runtime agents use separate accounts, and build-time residue is wiped from the writable layer before packing, so reference answers do not leak into the image (§6.1).

The rollout lives outside the GPU job. GPU training jobs are routinely preempted to raise utilisation. In earlier pipelines the agent loop ran inside the preemptible GPU pod with model serving and the RL framework; a preemption killed the loop while its sandbox survived, and recovery replayed a command log to reconcile the two, reusing recorded results for completed operations so non-idempotent commands did not run twice. From DeepSeek-V4.1, rollout execution moved onto DSec as two parts outside the preemptible pool: an agent sandbox that hosts the scaffold (for example DeepSeek Harness) and its tools, and a worker container that manages the sandbox as a scaffold-agnostic control layer. Together they hold the complete rollout state, so a preempted GPU job reconnects and continues without replay (§6.2).

Pause instead of hold. Keeping state until the rollout finishes would leave many idle sandboxes holding memory while training is suspended, so the RL framework sends pause requests to all sandboxes of a preempted job. A container is frozen with docker pause, given swap through memory.swap.max and reclaimed with memory.reclaim (anonymous and file pages); resume prefetches with MADV_WILLNEED, then unpauses. A microVM is snapshotted (memory and execution state) and its Firecracker process killed; resume starts a new process from the snapshot. Any request to a paused sandbox resumes it transparently first (§6.3).

  1. A rollout starts. The GPU job serves the policy model. On DSec, outside the preemptible pool, a worker container drives the scaffold (for example DeepSeek Harness) in an agent sandbox.
  2. Turns 1 to 3. The model proposes actions, the sandbox runs them; files, packages and services accumulate as state.
  3. The GPU job is preempted. Training stops, but the worker container and agent sandbox keep the complete rollout state: they are its single source of truth.
  4. Pause: memory goes back. The RL framework pauses every sandbox of the preempted job. A container is frozen, given swap and reclaimed (memory.reclaim); a microVM is snapshotted and its process killed.
  5. The GPU job reconnects. The restarted job reconnects to the worker container. Its next request resumes the sandbox transparently (prefetch with MADV_WILLNEED, then unpause; or restore the microVM snapshot).
  6. Turns 4 to 6, reward. The rollout continues where it stopped. No command-log replay, no recovery logic in the RL framework.

Agent misbehaviour, and what the sandbox can do about it

§6.4, §6.5

Production showed two risks: a task that appears to pass because the agent got the answer through an unintended channel, which corrupts training and evaluation signals, and agent actions that damage the environment or its neighbours (§6.4). The paper's catalogue:

What agents didKindMitigation in the paper
Searched platform-managed files and channels for residual answers; inspected chronus logs for leaked answersanswer-seeking, insideAppArmor file read/write and socket rules, applied even to root inside the sandbox
Forged user requests with crafted RPC messages sent straight to chronus socketsanswer-seeking, insideAppArmor socket rules
Overwrote /bin/bash (chronus invokes bash) to bypass checks or inject commands into later sessionsanswer-seeking, insideAppArmor file rules
After those controls arrived, used XFS_IOC_SWAPEXT (swaps two files' data extents) to read protected contents through another descriptor; it corrupted XFS metadata and shut the filesystem downanswer-seeking that broke infrastructurenot stated: a bypass of the controls
Scanned ports and services for reachable mirrors; fetched GitHub code through Go module proxies; installed newer package releases looking for existing implementationsanswer-seeking, outsideper-sandbox eBPF allowlists by IP, port and protocol, set per task and updatable as a task moves between stages
Ran grep recursively from /, read /proc/kpagecgroup and crashed the kernel through a kernel bugaccidentnone: not covered by access control
In an exploitation task, ran attack commands inside its own container instead of the target VM, crashing its kernelaccidentnone stated
Ran yes; chronus recorded the endless output for asynchronous retrieval, tens of gigabytes of storageaccidentnone stated

From §6.4 and §6.5.

The authors draw two limits themselves: final-output checks alone cannot establish whether an agent solved the task as intended, and the access controls "address only part of the problem and do not provide a general defense against destructive behavior such as triggering kernel bugs"; they rely on observability and keep hardening DSec as models change (§6.4, §6.5). The paper frames these controls as a mitigation of reward hacking (Amodei et al., Skalse et al.; reward hacking in general: Reward hacking): a shortcut the sandbox blocks never reaches the reward function. It does not claim an inescapable sandbox, and the XFS episode shows an agent working around a control after it was introduced.

Results

§8 Evaluation, Figures 10 to 13

The evaluation runs on a dedicated 10-node CPU test cluster, separate from production. Workloads come from real RL training and evaluation: internal software-engineering suites, SWE-bench, Terminal-Bench, security exploit tasks (§8.1). Only the four §5 mechanisms are evaluated (§8).

The test hardware

MicroVM nodes are bare metal (2 × 96-core AMD EPYC 9655 with SMT, 1.5 TB DRAM, 3.4 TB local disk) so there is no nested virtualisation; container experiments run inside a QEMU VM (1 × 96 cores, 192 hardware threads, 512 GB, 5.8 TB). Hosts run Linux 7.0, microVM guests Linux 6.1. (§8.1)

ExperimentPaper saysDecoded from the figure

"Decoded" values come from the figures' own vector paths, each axis calibrated on its tick marks (largest calibration residual under 0.0001 of an axis unit); scripts decode_figs.py and recompute.py. Every curve is in the figures tab.

  • On-demand loading (§8.2, Figure 10): a burst of 8,192 containers across 10 nodes with diverse multi-gigabyte images. Eager pulls from a remote registry must download and extract every layer, so containers barely start for the first 20 minutes; EROFS reaches peak concurrency nearly as fast as a fully local, pre-cached baseline and finishes with it. CPU and memory differed negligibly and are not shown.
  • Layers against tar (§8.3, Figure 11): the same workspace and toolkits as a tar.gz extracted in every sandbox, or as an EROFS layer mounted directly, with model generation replaced by a recorded, deterministic sequence of tool calls. Peak CPU is higher with EROFS because more sandboxes reach the tool-call phase sooner, not because setup costs more.
  • Memory (§8.4, Figure 12): four Firecracker configurations on a real agentic-RL workload. pmem collapses duplicated guest page caches; free-page reporting barely moves the peak but returns idle memory over time; both together use least. pmem's higher transient CPU may come from synchronous cold faults, so CPU-constrained operators may prefer free-page reporting alone.
  • CPU QoS (§8.5, Figure 13): a latency-sensitive chess application beside 10% to 50% best-effort load. The leftover inflation comes from lower turbo frequency under multicore load and from memory-bandwidth and last-level-cache contention that core scheduling does not address; the authors judge it tolerable and do not isolate memory bandwidth.

Why it matters (beyond the paper)

Every agentic RL recipe in this knowledge base assumes an environment supply that executes untrusted code at rollout rates a GPU cluster can consume, and none of them prices it. DSec is one of the first detailed public accounts of that layer at frontier scale (the paper's related work notes that MiMo-V2-Flash and ComputerRL mention their execution environments but focus on the model; §9). A comparable open-source platform, AgentENV, hosts DSec's released storage code (its own claims are in the dated block at the end of What it takes to use this).

Two things to take from it, as the old version of this page put them. The ratio of 5,000 creations a second to about 160 nodes is what makes agentic RL affordable at this scale, and it is an infrastructure result rather than an algorithmic one: a lab without it is not running the same experiments, whatever recipe it copies. And the four-backend design is the transferable idea for anyone building smaller: isolation is a per-task cost, not a platform decision. Both are interpretations, not findings of the paper; the first is also hard to check, since the scale figures come without a measurement method (see below).

Connections

  • Terminal-Universe manufactures environments from recorded agent trajectories; DSec runs them, and its pack_diff lets agents build them on the same platform (§6.1).
  • MOLE watches agents for insider-style behaviour; DSec's §6.4 catalogue is what that behaviour looks like from the sandbox's side.
  • HarnessDev has agents build their own harness; DSec's agent sandbox is where such a harness (DeepSeek Harness here) runs.
  • DeepSeek-R1 and the DeepSeek page: the models whose agentic RL runs on DSec; DeepSeek-V3 is the same lab's co-designed training stack; the 3FS storage DSec reuses comes from its Fire-Flyer AI-HPC cluster.
  • Integrated on Topic: llm-training-and-post-training.

How much of this to believe

What holds up. The workload study and the mechanism results are internally consistent to a degree few systems papers are checked for: every figure ships as vector graphics, and decoding them on their own tick marks reproduces the text's numbers, 45.2% and 17.3% exactly, 40.2% and 21.2% within 0.1 point, 57% and 5.5× within rounding (checks). The mechanisms are standard, documented Linux features (EROFS, overlayfs, virtio-pmem, DAMON, free-page reporting, SCHED_IDLE, core scheduling, AppArmor, eBPF) combined with reported configuration and no kernel changes, so the directions are plausible on prior knowledge too. The QoS result is clear: core scheduling's error bars sit clear of the baseline's at every load from 10% to 50%. The pre-cached baseline in Figure 10 is a strong one, and EROFS matches it.

What is weaker.

  • The headline scale is self-reported. About 3 M a day, about 380K peak concurrency and over 5,000 creations a second come with no trace, no measurement window and no figure (§2.4). A sanity check with Little's law and Figure 7's lifetimes gives an average concurrency near 72K, so the 380K peak implies peaks about five times the daily average: plausible for bursty RL, not verifiable. The abstract's "over 380,000" and §2.4's "~380K" also differ in direction.
  • The paper's most original part is not evaluated. The RL co-design (rollouts surviving preemption, pause and resume, agent-built environments) is excluded from the evaluation by design (§8): there is no preemption rate, recovery time, memory reclaimed, or count of rollouts saved. The same holds for cloud bursting ("about 30% of peak overflow", with "overflow" not defined) and the misbehaviour catalogue (anecdotes with no rates; the authors say so).
  • Test cluster, single runs. All four experiments run once on a 10-node test cluster, not production; Figure 13 has error bars and Figure 11 shaded bands, but neither is defined (spread across nodes? runs?), and no experiment states repetitions (§8.1).
  • Baselines are the obvious ones, not the best ones. On-demand loading is compared with eager registry pulls and a local cache, not with the lazy-loading systems the paper itself cites (Nydus, DADI/OverlayBD, FaaSNet, CoFS); EROFS layers are compared with tar extraction, not with other layer schemes (§9). The claims are "better than eager", not "better than the state of the art".
  • Small text-figure mismatches (1.71×, the tar run's 45 minutes, pmem's CPU rise): none changes a conclusion; the readings are in the closed block below.
  • Fairly stated limits count in its favour: libdsec is not a full abstraction, the access controls are partial, pmem costs CPU, and residual interference is left unaddressed on purpose.
The text-figure mismatches, read from the decoded figures

The 1.71× is 60 / 35 from rounded readings; the curves end at 34.2 and 57.0 minutes (1.67×), and cold pulling ends before the plot's 60-minute edge rather than "over 60". The tar run's EROFS side ends near 47 minutes on the figure against 45 in the text. pmem's CPU rise reads 27.4% to 39.4% on the curve against 26.5% to 41.4% in the text, and only for the second burst; in the first the baseline already reaches 33.5%. None changes a conclusion.

Verdict: believe the design and the workload characterisation, and the four mechanisms' directions and rough sizes. Treat the production scale as the authors' own report and the RL co-design, the paper's most original part, as a described architecture rather than a measured result.

What it takes to use this

DSec itself, libdsec and the RL integration are not released; only the storage path is (a Rust OverlayBD and ublk library, MIT, inside AgentENV). Everything else is configuration of stock Linux that a team can rebuild at small scale: EROFS plus overlayfs layers, Firecracker with virtio-pmem and free-page reporting, SCHED_IDLE plus core scheduling, AppArmor and eBPF, power-of-k placement. It pays for bursty, low-reuse, mostly idle, long-lived sandboxes, the workload of §4; with few reused images a local cache does as well.

The details: code, what to rebuild, hardware, when it pays, what it does not solve
  • Code: DSec, libdsec and the RL integration are not released. What is released is the storage path, a Rust port of OverlayBD (to which the authors contributed) plus their Rust ublk library, published inside kvcache-ai/AgentENV (MIT licence) with backends for 3FS, object storage such as OSS and container registries (§7). Some write-ups described DSec as open-sourced (for example); it is not.
  • What you can rebuild from public parts: EROFS images with overlayfs composition (a 30-line dockerd patch in the paper's case), Firecracker microVMs with virtio-pmem DAX for read-only layers and DAMON plus balloon free-page reporting for writable ones, SCHED_IDLE plus core scheduling for best-effort neighbours, AppArmor and eBPF for access control, and power-of-k placement with edge-side admission. All of it is configuration of stock Linux, per the paper (§7). AgentENV and E2B are open platforms to start from.
  • Hardware at DSec's scale: about 160 CPU nodes, 30K cores and 250 TB of DRAM per unit, plus a 3FS deployment of tens of storage servers (each 20 × 15 TB SSDs, 2 × 400 Gbps RDMA) for hundreds of thousands of cores (§2.4, §7). The mechanisms do not need that scale; the measured gains came from a 10-node cluster.
  • When it pays off: bursty creation of many sandboxes from a large, low-reuse image set, mostly idle CPU, and long-lived state: exactly the workload of §4. With few, reused images, a local cache already does as well (Figure 10's cached baseline); with CPU-bound sandboxes, overcommit buys little; on CPU-constrained nodes, pmem's extra CPU may not be worth its memory savings (§8.4).
  • What it does not solve: agents crashing kernels or finding new answer channels; final-output checks need help from observability (§6.5).
Since the paper (dated: checked 26 October 2026)

The open-source platform AgentENV says in its README (read 3 October 2026) that it powers agentic RL training for Kimi K3 and has scaled to 1.5 million images in production; DSec's released storage code lives in that repository.

Coverage: dated 19 September 2026, it surfaced through TechNode and Bloomberg on 23 September and a Hacker News thread posted on 26 September (313 points when this page was first written on 28 September; 323 points and 116 comments through the Hacker News API on 3 October). It was two days older than the research window it was found in, and had not been recorded here before.

arXiv still lists only v1 of the paper (checked 26 October 2026).