Skip to content
Snippets Groups Projects
Commit 74e03796 authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig) Committed by Kristian Klausen
Browse files

roles/common: Install generic OOM configuration

- Allow killing of any cgroup if swap is about to run out. When swap is
  at least 90% full, oomd will kill a cgroup, tending to kill the cgroup
  with the highest swap usage.
- Allow killing cgroups of logged in users under severe memory pressure.
  When a cgroup is stalled waiting for memory at least 60% of the time,
  for at least 30 seconds, oomd will attempt to kill it or one of its
  descendant cgroups.
parent fbdadc16
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !536. Comments created here will be created in the context of that merge request.
[Slice]
ManagedOOMSwap=kill
[Service]
ManagedOOMMemoryPressure=kill
ManagedOOMMemoryPressureLimit=60%
......@@ -103,6 +103,20 @@
command: systemd-tmpfiles --create
when: zramtmpfiles.changed
- name: create drop-in directories for oomd
file: path=/etc/systemd/system/{{ item }}.d state=directory owner=root group=root mode=0755
with_items:
- "-.slice"
- user@.service
- name: install drop-in snippets for oomd
copy: src=oomd-override_{{ item }}.conf dest=/etc/systemd/system/{{ item }}.d/override.conf owner=root group=root mode=0644
with_items:
- "-.slice"
- user@.service
notify:
- systemd daemon-reload
- name: start systemd-oomd
service: name=systemd-oomd state=started enabled=yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment