After installing containerd Version: 1.4.3~ds1-2 on Debian testing from Debian, I noticed it is almost always at the top of the top output, sometimes using 10% CPU.
This is a fresh installation of containerd with nothing configured.
This is wasteful, and prevents CPU and system to go into deeper sleep mode, which is important on laptops, but also on desktop. It also interferes with very accurate time measurements of other programs.
Running strace -f on the running process shows that is is using a very frequently futex and short sleep of 20us.
Consider using epool with multi-second timeout, and possibly eventfd for futex waits (which can be be epool-ed on too), instead of explicit pooling with no timeout and nanosleep.
Or maybe my diagnosis is wrong, as I see a lot of futex wakes, despite me doing absolutly nothing with containerd.
A ~3 seconds sample of strace in the attachment.
containerd-strace.txt
After installing
containerdVersion: 1.4.3~ds1-2 on Debian testing from Debian, I noticed it is almost always at the top of thetopoutput, sometimes using 10% CPU.This is a fresh installation of
containerdwith nothing configured.This is wasteful, and prevents CPU and system to go into deeper sleep mode, which is important on laptops, but also on desktop. It also interferes with very accurate time measurements of other programs.
Running
strace -fon the running process shows that is is using a very frequently futex and short sleep of 20us.Consider using
epoolwith multi-second timeout, and possibly eventfd for futex waits (which can be beepool-ed on too), instead of explicit pooling with no timeout andnanosleep.Or maybe my diagnosis is wrong, as I see a lot of futex wakes, despite me doing absolutly nothing with
containerd.A ~3 seconds sample of
stracein the attachment.containerd-strace.txt