If you have swarm services and dockerd is creating a high load even with the containers just being idle, the easiest solution is to upgrade to a newer docker version.
For example an identical config of 3 nodes, with Redis 5 with 30 replicas produces a load of about 1.45 in Debian 10 with Docker 18.09.1
If I create the same setup on Debian 11, with Docker 20.10.5+dfsg1 then the CPU usage is low.
One other difference I wondered is the kernel. In my test setup Debian 10 has kernel linux-image-4.19.0-25-amd64, while Debian 11 has linux-image-5.10.0-11-amd64.
To see if it is some major difference caused between Kernel 4.19 and 5.10 (though I doubted this was the issue), I installed the latest kernel 5.10 in Debian 10 linux-image-5.10.0-0.deb10.26-amd64 on all nodes. There was no difference at all between 4.19 and 5.10 kernels, so the issue seems to solely be based on an issue that exists in Docker 18.09.01 (or at least how it was compiled for Debian 10) vs the Debian 11's Docker 20.10.5
Debian 11 Docker Info:
root@Deb11Docker02:~# docker version
Client:
Version: 20.10.5+dfsg1
API version: 1.41
Go version: go1.15.15
Git commit: 55c4c88
Built: Mon May 30 18:34:49 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.5+dfsg1
API version: 1.41 (minimum version 1.12)
Go version: go1.15.15
Git commit: 363e9a8
Built: Mon May 30 18:34:49 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.13~ds1
GitCommit: 1.4.13~ds1-1~deb11u4
runc:
Version: 1.0.0~rc93+ds1
GitCommit: 1.0.0~rc93+ds1-5+deb11u2
docker-init:
Version: 0.19.0
GitCommit:
Debian 10 Docker Info:
Client:
Version: 18.09.1
API version: 1.39
Go version: go1.11.6
Git commit: 4c52b90
Built: Sun, 21 Feb 2021 18:18:35 +0100
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.09.1
API version: 1.39 (minimum version 1.12)
Go version: go1.11.6
Git commit: 4c52b90
Built: Sun Feb 21 17:18:35 2021
OS/Arch: linux/amd64
Experimental: false
docker, dockerd, swarm, cpu, usage, solutionif, creating, containers, idle, easiest, upgrade, newer, identical, config, nodes, redis, replicas, produces, debian, dfsg, kernel, linux, amd, installed, deb, info, api, git, os, context, default, experimental, server, containerd, ds, gitcommit, runc, rc, init, feb,