Skip to content

Uses a lot of CPU when idle #5089

@baryluk

Description

@baryluk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions