nohang - Man Page

A sophisticated low memory handler


nohang [OPTION]...


nohang is a highly configurable daemon for Linux which is able to correctly prevent out of memory (OOM) and keep system responsiveness in low memory conditions.


For basic usage

  • Linux (>= 3.14, since MemAvailable appeared in /proc/meminfo)
  • Python (>= 3.3)

To respond to PSI metrics (optional)

  • Linux (>= 4.20) with CONFIG_PSI=y

To show GUI notifications (optional)

  • notification server (most of desktop environments use their own implementations)
  • libnotify (Arch Linux, Fedora, openSUSE) or libnotify-bin (Debian GNU/Linux, Ubuntu)
  • sudo if nohang started with UID=0.

Command-Line Options

-h, --help

show this help message and exit

-v, --version

show version of installed package and exit

-m, --memload

consume memory until 40 MiB (MemAvailable + SwapFree) remain free, and terminate the process

-c CONFIG, --config CONFIG

path to the config file. This should only be used with one of the following options: --monitor, --tasks, --check


check and show the configuration and exit. This should only be used with -c/--config CONFIG option


start monitoring. This should only be used with -c/--config CONFIG option


show tasks state and exit. This should only be used with -c/--config CONFIG option



path to vanilla nohang configuration file


path to configuration file with settings optimized for desktop usage


path to file with default nohang.conf values


path to file with default nohang-desktop.conf values


optional log file that stores entries if separate_log=True in the config


logrotate config file that controls rotation in /var/log/nohang/

nohang.conf vs nohang-desktop.conf


The next problems can occur with out-of-tree kernels and modules:

How to Configure

The program can be configured by editing the config file. The configuration includes the following sections:

Just read the description of the parameters and edit the values. Restart the daemon to apply the changes.

Check Config

Check the config for errors:

$ nohang --check --config /path/to/config

How to Test

The safest way is to run nohang --memload. This causes memory consumption, and the process will exits before OOM occurs. Another way is to run tail /dev/zero. This causes fast memory comsumption and causes OOM at the end. If testing occurs while nohang is running, these processes should be terminated before OOM occurs.


To view the latest entries in the log (for systemd users):

$ sudo journalctl -eu nohang.service


$ sudo journalctl -eu nohang-desktop.service

You can also enable separate_log in the config to logging in /var/log/nohang/nohang.log.


Sending SIGTERM, SIGINT, SIGQUIT or SIGHUP signals to the nohang process causes it displays corrective action stats and exits.

Reporting Bugs

Please ask any questions and report bugs at <>.


Written by Alexey Avramov <>.


Homepage is <>.

See Also

oom-sort(1), psi-top(1), psi2log(1)



Referenced By

oom-sort(1), psi2log(1), psi-top(1).

Linux System Administrator's Manual