Image list with containerd store is very slow #47564
Labels
area/images
containerd-integration
Issues and PRs related to containerd integration
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
status/0-triage
Milestone
Description
docker images
is very slow when backed by the containerd store.Upon inspect it looks like every image is being processed sequentially, where "process" involves a number of API requests to containerd.
Listing 68 images takes roughly a full second.
As part of that there 2891 spans from containerd.
Some of that even involves calculating disk usage from the snapshotters.
This is after I've pruned some images.
Before pruning I had about 325 images and that took approximately 5s.
Reproduce
docker pull a few images and read the trace data
Expected behavior
Image listing should scale better
docker version
docker version Client: Version: 24.0.0-beta.1-450-gfa5a0e8139.m API version: 1.44 Go version: go1.21.1 Git commit: fa5a0e8139 Built: Sun Oct 1 19:58:37 2023 OS/Arch: linux/amd64 Context: default Server: Engine: Version: dev API version: 1.45 (minimum version 1.24) Go version: go1.22.0 Git commit: bddd892e9108a7944df8fca9fde821bb97616bab Built: Thu Mar 14 19:29:50 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.14-1 GitCommit: dcf2847247e18caba8dce86522029642f60fe96b runc: Version: 1.1.12-1 GitCommit: 51d5e94601ceffbbd85688df1c928ecccbfa4685 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
I'm using the last build off master that actually successfully lists images for me (It seems there's another bug on master introduced by 52a80b4
Using the current master (cdf70c0) things are actually a bit slower and even more API requests are made to containerd (more than 1000 more spans!)
Attached jaeger json, this is from a different capture than reported above, but similar results
traces-1710445565373.json.zip
From the flamegraph you'll see there's nothing that's taking a lot of time in particular, just the act of processing things sequentially:
The text was updated successfully, but these errors were encountered: