Skip to content

Feature: Honor resource limits for CPU and memory #682

Open
@jabbrwcky

Description

@jabbrwcky

Hi,

when running the adapter in my cluster I often get OOM-Kills because of a runaway resource consumption.

It would be nice if prometheus-adapter would honor configured resource limits, so it is more stable to operate.

The simplest way would be to use https://github.com/uber-go/automaxprocs for CPU limits and https://github.com/KimMachineGun/automemlimit for memory resource limits.

Depending on how much configurability is required (both default to NOOP if no (cgroup) limits are configured) the integration complexity ranges form two _-imports to adding three flags (enabling each feature + configuring percentage of memory quota used for go process)

I'd be happy to add the required functionality, but I'd first like to see what meets the project requirements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions