Skip to content

netdata OOMScore

Valentin Hilbig edited this page Mar 25, 2021 · 11 revisions

netdata runs with OOMScore = 1000. This means netdata will be the first to be killed when your server runs out of memory.

setting netdata OOMScore

You can set netdata OOMScore in netdata.conf, like this:

[global]
    OOM score = 1000

netdata logs its OOM score when it starts:

# grep OOM /var/log/netdata/error.log
2017-10-15 03:47:31: netdata INFO : Adjusted my Out-Of-Memory (OOM) score from 0 to 1000.

OOM score and systemd

netdata will not be able to lower its OOM Score below zero, when it is started as the netdata user (systemd case).

To allow netdata control its OOM Score in such cases, you will need to edit /etc/systemd/system/netdata.service and set:

[Service]
# The minimum netdata Out-Of-Memory (OOM) score.
# netdata (via [global].OOM score in netdata.conf) can only increase the value set here.
# To decrease it, set the minimum here and set the same or a higher value in netdata.conf.
# Valid values: -1000 (never kill netdata) to 1000 (always kill netdata).
OOMScoreAdjust=-1000

Run systemctl daemon-reload to reload these changes.

The above, sets and OOMScore for netdata to -1000, so that netdata can increase it via netdata.conf.

If you want to control it entirely via systemd, you can set in netdata.conf:

[global]
    OOM score = keep

Using the above, whatever OOM Score you have set at netdata.service will be maintained by netdata.

General


Running Netdata

Special Uses

Notes on memory management


Database Replication and Mirroring


Backends
archiving netdata collected metrics to a time-series database


Health monitoring - Alarms
alarms and alarm notifications in netdata


Netdata Registry


Monitoring Info


Netdata Badges


Data Collection

Binary Modules

Python Modules

Node.js Modules

BASH Modules

Active BASH Modules

Obsolete BASH Modules


API Documentation


Web Dashboards


Running behind another web server


Package Maintainers


Donations


Blog


Other monitoring tools

Clone this wiki locally