Skip to main content
SmolVM is optimized for low-latency agent workflows, providing sub-second boot times and minimal overhead for command execution.

Benchmark Results

Latest lifecycle timings (p50) on a standard Linux host:
Benchmarks measured on AMD Ryzen 7 7800X3D (8C/16T), Ubuntu Linux, KVM/Firecracker backend.

Running Your Own Benchmarks

You can benchmark SmolVM on your hardware using the included benchmark script:
This will create, start, run commands in, and teardown 10 VMs sequentially, reporting detailed timing metrics.

Performance Characteristics

Boot Performance

  • MicroVM Creation: SmolVM allocates IP addresses, TAP devices, and network rules in ~572ms
  • SSH Ready Time: The VM boots and becomes accessible via SSH in ~2.1s total
  • Hardware Virtualization: Uses KVM on Linux and Hypervisor.framework on macOS for near-native performance

Runtime Performance

  • Command Execution: ~43ms average latency for running commands via SSH
  • Memory Overhead: Minimal host overhead beyond configured VM memory (default 512MB)
  • CPU Efficiency: Hardware virtualization provides near-native CPU performance

Teardown Performance

  • Graceful Shutdown: Firecracker VMs can be stopped in ~751ms
  • Resource Cleanup: Network rules, TAP devices, and disk images are cleaned up automatically
  • Fast Path for Ephemeral VMs: SIGKILL-based teardown for sandbox VMs that don’t need state preservation

Optimization Tips

1. Reuse VMs for Multiple Commands

Instead of creating a new VM for each command, reuse the same VM:
This amortizes the ~2.1s boot time across multiple operations.

2. Use Appropriate Resource Allocation

Configure CPU and memory based on your workload:
Over-allocating resources can lead to host memory pressure and slower performance.

3. Pre-built Custom Images

For workloads requiring specific dependencies, build a custom rootfs image with pre-installed packages:
This eliminates the need to install packages at runtime.

4. Shared vs Isolated Disk Mode

Choose the appropriate disk mode for your use case: Isolated Mode (default): Each VM gets its own copy of the rootfs
  • ✅ Complete isolation between VMs
  • ✅ No cross-VM contamination
  • ❌ Higher disk usage
  • ❌ Copy overhead on first boot
Shared Mode: All VMs use the same rootfs image
  • ✅ No disk copy overhead
  • ✅ Lower disk usage
  • ❌ Changes persist across VMs
  • ❌ Potential cross-VM contamination

5. Backend Selection

SmolVM supports multiple backends with different performance characteristics:
  • Firecracker (Linux): Fastest boot times, lowest overhead, recommended for production
  • QEMU (macOS/Linux): Broader compatibility, slightly higher overhead

Performance Monitoring

Check VM Status

Reconcile Stale VMs

Detect and clean up VMs marked as RUNNING but with dead processes:

Scalability Considerations

IP Address Pool

By default, SmolVM allocates IPs from 172.16.0.2 to 172.16.0.254, supporting 253 concurrent VMs.

SSH Port Pool

Host-side SSH forwarding uses ports 2200-2999, supporting 800 concurrent VMs.

System Limits

Check your system’s ulimit for open files and processes:

Profiling Tips

Measure Individual Phases

Network Latency

Measure network roundtrip time: