Skip to content

[BUG] Massive performance degradation of "ps [SERVICE]" command since 2.24.0 #11881

@sucat

Description

@sucat

Description

Since the version 2.24.0 I experience massive performance degradation when using docker-compose ps [SERVICE] command.
It's very noticeable for my project with over 50 containers but the more more services are defined in the docker-compose.yml the slower it is.

Steps To Reproduce

Create large docker-compose.yml (I truncated the content for visibility purposes)

services:
  nginx1:
    image: nginx:1.22.1
  nginx2:
    image: nginx:1.22.1
  nginx3:
    image: nginx:1.22.1
  nginx4:
    image: nginx:1.22.1
  [...]
  nginx499:
    image: nginx:1.22.1

Use the command: time docker-compose ps nginx1

500 containers:

Docker Compose version v2.27.1
NAME      IMAGE     COMMAND   SERVICE   CREATED   STATUS    PORTS
real    0m24.108s
user    0m28.476s
sys     0m0.307s


Docker Compose version v2.24.0
NAME      IMAGE     COMMAND   SERVICE   CREATED   STATUS    PORTS
real    0m23.878s
user    0m28.778s
sys     0m0.257s


Docker Compose version v2.23.3
NAME      IMAGE     COMMAND   SERVICE   CREATED   STATUS    PORTS
real    0m0.175s
user    0m0.187s
sys     0m0.039s

200 containers:

Docker Compose version v2.27.1
NAME      IMAGE     COMMAND   SERVICE   CREATED   STATUS    PORTS
real    0m4.142s
user    0m4.864s
sys     0m0.045s


Docker Compose version v2.24.0
NAME      IMAGE     COMMAND   SERVICE   CREATED   STATUS    PORTS
real    0m4.052s
user    0m4.891s
sys     0m0.052s


Docker Compose version v2.23.3
NAME      IMAGE     COMMAND   SERVICE   CREATED   STATUS    PORTS
real    0m0.115s
user    0m0.104s
sys     0m0.038s

100 containers:

Docker Compose version v2.27.1
NAME      IMAGE     COMMAND   SERVICE   CREATED   STATUS    PORTS
real    0m1.145s
user    0m1.294s
sys     0m0.053s


Docker Compose version v2.24.0
NAME      IMAGE     COMMAND   SERVICE   CREATED   STATUS    PORTS
real    0m1.102s
user    0m1.264s
sys     0m0.084s


Docker Compose version v2.23.3
NAME      IMAGE     COMMAND   SERVICE   CREATED   STATUS    PORTS
real    0m0.098s
user    0m0.077s
sys     0m0.044s

Compose Version

Docker Compose version v2.27.1
Docker Compose version v2.24.0
Docker Compose version v2.23.3

Docker Environment

Client: Docker Engine - Community
 Version:    26.0.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.1
    Path:     /home/[xxxxxxxxxx]/.docker/cli-plugins/docker-compose

Server:
 Containers: 47
  Running: 0
  Paused: 0
  Stopped: 47
 Images: 87
 Server Version: 26.0.1
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  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
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: e377cd56a71523140ca6ae87e30244719194a521
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.1.82-99.168.amzn2023.x86_64
 Operating System: [xxxxxxxxxx]
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.25GiB
 Name: [xxxxxxxxxx]
 ID: [xxxxxxxxxx]
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions