Agentic AI creates growing demand for datacenter CPUs to execute tools inside sandboxes. Our characterization of open-source agentic AI benchmarks and our sandbox workloads shows that memory capacity prevents servers from fully utilizing these CPUs. The cause is a mismatch between CPU and memory demand: sandboxes execute tools in short bursts, then wait for LLM responses or user input while their memory remains stranded. Servers can use these idle periods to colocate more agents and improve datacenter efficiency, but server memory capacity limits the number of agents each can support. To increase effective memory capacity, idle sandboxes can be compressed or moved to slower memory tiers, e.g., CXL or SSDs. However, these operations and later memory restoration consume cycles and delay tool execution. Hence, memory management must increase effective memory capacity while preserving cycles for new agents and avoiding delays when idle agents resume execution. We propose Ambar, an agent-aware memory manager that jointly manages memory tiering and compression to support more concurrent agents per server while limiting execution overhead. Under memory pressure, Ambar decides which sandboxes to move to a slower memory tier, compress, or both. It predicts sandbox idle time and weighs the local memory it frees against the time needed to reclaim and restore its memory before tool execution resumes. To make reclamation practical, Ambar introduces three optimizations: (i) efficient snapshotting with (ii) hot-page tracking to reduce state-preservation work and eagerly restore only the memory that the next tool needs, and (iii) it offloads data movement and compression to hardware accelerators. Compared to conventional frameworks, Ambar increases the number of agents per server by 5.9x and CPU utilization by 5.0x, while limiting agent P99 latency increases by up to 6.3%.
Figures & tables
Figure 1. Tool time, LLM inference time, and user idle time distributions across open-source workloads and public traces.
Figure 2. Tool and LLM call times of workloads A–H (median, line to P90) and breakdown of task time.
Figure 3. CPU utilization and memory usage distributions.
Figure 4. CPU and memory usage of workloads A–H as a share of the sandbox allocation (median, whisker to P90).
Figure 5. CPU utilization and memory usage when scaling agent density in the server.
Figure 6. Host memory and CPU, requested and in use, as hosts pack more sandboxes.
Figure 7. Disk offload times for containers and VMs.
Figure 8. CXL offload times for containers and VMs.
Figure 9. SWE-agent slowdown relative to DRAM with lazy promotion from disk and with execution from CXL memory.
Figure 10. Fraction of each step’s pages reused from earlier steps, reuse distance in steps, and fraction of dirty pages.
Figure 11. Pages used per step by source, split into pages reused from earlier steps and pages used for the first time.
Figure 12. Sandbox memory breakdown: per-VM host and guest pages in VMs, and process roles in containers.
Figure 13. Compression ratios across workloads and sandbox types with the zstd-1 algorithm.
Figure 14. Median and P99 compression ratios of different algorithms across workloads and sandbox types.
Figure 15. Compression and decompression times across workloads and sandbox types with the zstd-1 algorithm.
Figure 16. Median and P99 (de)compression times of different algorithms across workloads and sandbox types.
Figure 17. Compression ratio and (de)compression times with the IAA accelerator across workloads and sandbox types.
Figure 18. High-level architecture of Ambar.
Figure 19. Hot set tracker overview.
Figure 20. Number of agents admitted per server with each configuration across workloads.
Figure 21. P50 task completion time with each configuration across workloads.
Figure 22. P99 task completion time with each configuration across workloads.
Figure 23. Useful CPU usage, without memory-management overhead, with each configuration across workloads.
Figure 24. Distributions of the reclamation and restoration times of a sandbox with Ambar across workloads.
Figure 25. Number of memory-management operations per mechanism with Ambar across workloads.
Figure 26. P50 task completion time of the single-mechanism configurations with reactive and proactive restoration.
Figure 27. Number of agents admitted and useful CPU utilization with Ambar under different user idle times.
Figure 28. P99 tool execution time per task and useful CPU utilization with Ambar under different LLM inference times.
Figure 29. Total number of memory-management operations under different accuracies of the LLM wait time predictor.