DSec: A Sandbox Infrastructure for Agentic Training at Scale

This presentation examines DeepSeek Elastic Compute (DSec), a production sandbox platform designed specifically for agentic reinforcement learning workloads. Operating at a scale of 160 CPU nodes, 30,000 cores, and 250 TB of DRAM per unit, DSec addresses the unique infrastructure challenges of training AI agents: bursty sandbox creation reaching 5,000 instances per second, long-lived stateful execution with sparse CPU utilization, massive heterogeneous image distribution, and the need for strong isolation against untrusted model-generated code. The presentation explores DSec's composable environment construction, on-demand image loading, memory efficiency mechanisms, and CPU quality-of-service controls, while examining the measured performance improvements and remaining open questions.
Script
Training AI agents creates a fundamentally different infrastructure problem than running traditional cloud workloads. DeepSeek Elastic Compute sustains 5,000 sandbox creations per second, 380,000 concurrent instances, and serves 3 million sandboxes daily, all while agents generate code that might try to escape, corrupt filesystems, or exhaust resources.
Agentic reinforcement learning doesn't look like serverless computing. Tasks create thousands of sandboxes in sudden bursts, then those sandboxes sit mostly idle for 15 to 17 minutes on average, burning memory while waiting for the next model action. About 90 percent use less than 5 percent of their requested CPU, yet the p99 lifetime exceeds three hours.
DSec decomposes each environment into independently versioned base images, workspaces, and toolkits, so updating a single toolkit no longer requires rebuilding every image that embeds it. This drops maintenance complexity from order m times N for monolithic images down to order m, turning a combinatorial rebuild problem into an incremental layer update.
Instead of downloading and unpacking entire images, DSec fetches compressed blocks on demand as files are accessed. In a burst of 8,192 containers, this completes the workload 1.71 times faster than eager pulling and cuts cumulative disk writes by 57 percent, because runtime access touches only 4 to 13 percent of each image depending on the programming language.
Virtio-pmem with direct access mapping cuts peak microVM memory usage by 40 percent by eliminating duplicate host and guest page caches, while proactive reclamation lowers time-integrated consumption by 21 percent. The trade-off is CPU overhead, as cold page faults require synchronous handling, pushing transient peak utilization from 26 to 41 percent.
DSec treats agent rollout state as infrastructure, allowing training jobs to reconnect after preemption without replaying command histories, while core scheduling and network policies limit interference and contain untrusted code. These measured improvements establish that composable layers, on-demand loading, and memory sharing address distinct bottlenecks, though questions about adaptive agent behavior, full-scale cost, and microarchitectural isolation remain open. Explore the full technical depth and create your own explanation at EmergentMind.com.