Skip to content

What is the startup and stop latency of a runsc container on a single core? #13182

@simon28li

Description

@simon28li

Description

Hello, I recently have a project that requires researching the startup and shutdown times of gVisor. I came across this resource: https://onidel.com/blog/gvisor-kata-firecracker-2025, where he mentions this.

Startup Time Comparison
gVisor: 50-100ms typical startup latency, as it initializes the user-space kernel and establishes system call interception mechanisms.
Kata Containers: 150-300ms startup time due to full VM initialization, kernel boot, and container runtime setup within the guest.
Firecracker: 100-200ms cold start, optimized through pre-warming techniques and minimal kernel configurations.

However, in my tests, I cannot achieve such standards. It takes more than 300ms to fully start and stop a container. The testing method I used was to run runsc run with a single-core limit and 2GB of memory. Could the issue be with my testing method?

  1. Preparation phase (Prepare)
    Export the rootfs from the Docker image, and write the Python payload script (test.py) and test data (test.txt) into it.
    Use runsc spec to generate an OCI configuration file, and modify it to make the rootfs read-only. Set the entry command to python3 /test.py, and set the memory and CPU limits.
    Perform a self-test to confirm that runsc run is basically functional.
  1. Test phase (Run)
    Obtain the list of available CPU cores from the NUMA node, and select cores according to the configured gradient (e.g., 1 core).
    For each core, repeatedly execute the following loop concurrently within a 1-second time window:
    Create separate bundle and state directories.
    Start the container using runsc run (full lifecycle: create → start → run → delete).
    Record the total container execution time (from the start of runsc run to the return of the command) and the Elapsed time reported by the Python script.
    Each time a loop is successfully completed, increment the count by one and return the time data.

Steps to reproduce

No response

runsc version

runsc -version
runsc version release-20260504.0
spec: 1.1.0-rc.1

docker version (if using docker)

uname

uname -a Linux localhost.localdomain 6.6.0-95.0.0.99.oe2403sp2.aarch64 #1 SMP Thu Jun 5 23:21:14 CST 2025 aarch64 aarch64 aarch64 GNU/Linux

kubectl (if using Kubernetes)

repo state (if built from source)

No response

runsc debug logs (if available)

Metadata

Metadata

Labels

type: bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions