Poor performance when switching to multiple CPU Cores
- Dominant language
- Go
- Stars
- 19.3k
- Forks
- 2k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 264
Description
### Description
I’m experiencing significant performance degradation when using GVisor with more than one CPU core. When running a container with a single CPU, everything works as expected. However, when I allocate two or more CPU cores, the container becomes extremely slow and idles at around 20% CPU usage, rendering it nearly unusable.
This issue occurs consistently across all containers I’ve tested, including completely empty containers, which exhibit the same performance degradation. Interestingly, even if the containers are only running a single thread, it seems like all cores of the CPU, when using multiple cores (e.g., 4 cores), experience high load, contributing to the overall slowdown.
### Steps to reproduce
1. Run any container with GVisor using a single CPU.
• Expected Result: The container performs normally with low CPU usage.
2. Run the same container with two or more CPU cores.
• Actual Result: The container becomes very slow, with high idle CPU usage (~20%) and poor performance.
### runsc version
```shell
runsc version release-20240807.0
spec: 1.1.0-rc.1
```
### docker version (if using docker)
```shell
Server: Docker Engine - Community
Engine:
Version: 27.1.2
API version: 1.46 (minimum version 1.24)
Go version: go1.21.13
Git commit: f9522e5
Built: Mon Aug 12 11:51:03 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.20
GitCommit: 8fc6bcff51318944179630522a095cc9dbf9f353
runsc:
Version: release-20240807.0
GitCommit:
docker-init:
Version: 0.19.0
GitCommit: de40ad0
```
### uname
_No response_
### kubectl (if using Kubernetes)
_No response_
### repo state (if built from source)
_No response_
### runsc debug logs (if available)
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.