Skip to content

High memory usage from monitoring_thread_loop #153

Open
@timwoj

Description

@timwoj

We discovered a problem recently where the monitoring thread spawned by libkqueue was using a very large amount of memory. After a bit of digging, we realized that it's allocating two arrays of ints that are the size of the maximum number of file descriptors on the system. The system we discovered this on is a Rocky 9 system, with a docker container running in containerd. In this environment, containerd sets the maximum number of descriptors to 1073741816. libkqueue then allocates about 8GB of memory.

While it is possible to tune the container down to use fewer descriptors, this seems like an upstream problem in libkqueue itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions