moby: Facing high CPU and memory after upgrade to 28.2.0 Buildkit GC ON
Not sure if this is the right place to post this.
Description
Hello, there.
I am facing a high CPU and memory consumption after upgrading docker from 28.1.1-1 to 28.2.0-1 on Arch Linux (linux 6.12.31-1-lts) at the date of 2025-06-02.
Yesterday, I made a upgrade using yay (yay v12.5.0 - libalpm v15.0.0)
[2025-06-01T13:22:47-0300] [ALPM] upgraded docker (1:28.1.1-1 -> 1:28.2.0-1)
[2025-06-01T13:22:47-0300] [ALPM] upgraded docker-buildx (0.23.0-1 -> 0.24.0-1)
[2025-06-01T13:22:47-0300] [ALPM] upgraded docker-compose (2.36.1-1 -> 2.36.2-1)
After stopping docker.socket and docker.service, the memory was released and I could confirm the issue was the docker upgrade. I made a downgrade to 28.1.1 and restarted docker and everything is fine now.
I did a second test upgrading docker again and restarting and I saw the high memory and CPU again.
Here is a picture of htop when opening only the terminal and with docker 28.2.0 running:
And here is a picture after the downgrade of docker to 28.1.1:
Reproduce
Install docker version 28.2.0 on Arch Linux (linux 6.12.31-1-lts) with yay and inspect memory/CPU with top/htop.
Expected behavior
Docker should run smoothly, as were with version 28.1.1
docker version
Client:
Version: 28.2.0
API version: 1.50
Go version: go1.24.3
Git commit: 879ac3f88f
Built: Sun Jun 1 13:32:57 2025
OS/Arch: linux/amd64
Context: default
Server:
Engine:
Version: 28.2.0
API version: 1.50 (minimum version 1.24)
Go version: go1.24.3
Git commit: 0e2cc22d36
Built: Sun Jun 1 13:32:57 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v2.1.1
GitCommit: cb1076646aa3740577fafbf3d914198b7fe8e3f7.m
runc:
Version: 1.3.0
GitCommit:
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client:
Version: 28.2.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: 0.24.0
Path: /usr/lib/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: 2.36.2
Path: /usr/lib/docker/cli-plugins/docker-compose
Server:
Containers: 6
Running: 0
Paused: 0
Stopped: 6
Images: 197
Server Version: 28.2.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: true
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cb1076646aa3740577fafbf3d914198b7fe8e3f7.m
runc version:
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.12.31-1-lts
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 7.579GiB
Name: alex
ID: 5009e496-3d06-49c4-9d75-35f5b4f0cbdb
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false
Additional Info
No response
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 7
- Comments: 24 (9 by maintainers)
I think it’s related to: https://github.com/moby/moby/pull/49899
Looks like most of the time is spent on calculating the size of buildkit cache snapshots:
Combining that with:
To confirm this, please disable buildkit GC in your daemon.json:
If that helps, and you want to keep the Buildkit GC on, you can temporarily disable the
redirect_dirand restart the daemon to see if it helps:and then considering making it off by default.
It could be it. I had like 300GB cache but I did also a
docker system prune. This could explain why I was not able to reproduce it anymore.