Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excluding Process #139

Open
alfie-13 opened this issue Jul 12, 2024 · 3 comments
Open

Excluding Process #139

alfie-13 opened this issue Jul 12, 2024 · 3 comments

Comments

@alfie-13
Copy link

Hi, I'm new to nohang and found it useful in our rhel8 environment. Is it possible to exclude some process to not to be killed by nohang? How can I do that?

@hakavlad
Copy link
Owner

Hi! You can change the priorities of processes when nohang select them as a victim.

See https://github.com/hakavlad/nohang/blob/v0.2.0/conf/nohang/nohang.conf.in#L189C5-L189C66

Edit the section 7. Customize victim selection: adjusting badness of processes in /etc/nohang/nohang.conf.

For example, prevent the termination of processes containing fooservice in the cgroup2 path:

@BADNESS_ADJ_RE_CGROUP_V2  -1000 /// fooservice

The same by name:

@BADNESS_ADJ_RE_NAME -1000 /// fooname

The configuration file contains examples. Just add the appropriate line to the configuration file and restart nohang.service.

@alfie-13
Copy link
Author

thanks @hakavlad so is this the right format if I wanted to exclude the calibre tool?

@BADNESS_ADJ_RE_NAME -1000 /// calibre

Also, what does -1000 do?

@hakavlad
Copy link
Owner

hakavlad commented Jul 14, 2024

is this the right format if I wanted to exclude the calibre tool?

Maybe not. For example, on my Debian, its name is GUIPool:

$ oom-sort -l40
oom_score oom_score_adj   UID     PID Name            VmRSS   VmSwap   cmdline
--------- ------------- ----- ------- --------------- ------- -------- -------
      822           233  1000  744337 Web Content        75 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      822           233  1000  744339 Web Content        75 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      822           233  1000  744344 Web Content        75 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      781           167  1000  741228 Isolated Web Co   321 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      780           167  1000  635548 Isolated Web Co   172 M     11 M /usr/lib/firefox-esr/firefox-esr -conten
      780           167  1000  635552 Isolated Web Co   230 M     10 M /usr/lib/firefox-esr/firefox-esr -conten
      780           167  1000  683991 Isolated Web Co   195 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      780           167  1000  744006 Isolated Web Co   180 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  635523 Privileged Cont   146 M      5 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  635555 Isolated Web Co   123 M     19 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  635566 Isolated Web Co   142 M     11 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  683581 Isolated Web Co   132 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  683629 Isolated Web Co   119 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  684096 Isolated Web Co   144 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  694204 Isolated Web Co   126 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  696824 Isolated Web Co   138 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  699282 Isolated Web Co   119 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  744237 Isolated Web Co   165 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      779           167  1000  744275 Isolated Web Co   173 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      778           167  1000  635580 Isolated Web Co    98 M      9 M /usr/lib/firefox-esr/firefox-esr -conten
      778           167  1000  635590 Isolated Web Co   100 M     10 M /usr/lib/firefox-esr/firefox-esr -conten
      778           167  1000  635609 Isolated Web Co   101 M     11 M /usr/lib/firefox-esr/firefox-esr -conten
      778           167  1000  635627 Isolated Web Co   107 M      7 M /usr/lib/firefox-esr/firefox-esr -conten
      778           167  1000  664285 Isolated Web Co   108 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      778           167  1000  683951 Isolated Web Co   108 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      735           100  1000  635500 WebExtensions     194 M      7 M /usr/lib/firefox-esr/firefox-esr -conten
      735           100  1000  740901 Isolated Web Co   206 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      734           100  1000  683565 Isolated Web Co   138 M      0 M /usr/lib/firefox-esr/firefox-esr -conten
      684             0  1000  635305 firefox-esr      1495 M    129 M /usr/lib/firefox-esr/firefox-esr -P
      669             0  1000  747845 GUIPool           248 M      0 M /usr/bin/python3.9 /usr/bin/calibre

I'll give more explanation later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants