There is an application running in a Docker container. According to Zabbix CPU stats, this application cannot get more than 40% CPU usage in the server (this graph shows 30 servers running with one container each, but should be enough as proof of concept)
If I read any of the servers CPU usage right now, using uptime or sar, I can see that the system is using about 25%-30% of available CPU (this system has 4 cores)
However, if I run docker stats docker believes that the CPU used is much higher (as this is a live streaming goes up and down, but at a glance looks like most of the time is 70%+, something higher than 100%)
The current hypothesis is that somehow docker thinks that is using much more CPU that is actually available, and it is not allowing the application to use all server resources.
We are not running docker or the containers with any of the CPU limits (that we know of ...)
What can be happening here? How can I make the container use 100% CPU ?
More information docker info
# docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.7.1-docker)
scan: Docker Scan (Docker Inc., v0.12.0)
Server:
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 38
Server Version: 20.10.12
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc version: v1.0.2-0-g52b36a2
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.19.0-14-amd64
Operating System: Debian GNU/Linux 10 (buster)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.828GiB
Name: MODCDEL76
ID: 2MHD:MX2B:UIVJ:DRVP:UIYC:735Y:UPI2:5VCE:RASZ:ETTB:KTNZ:5UHI
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support



