Skip to content
Snippets Groups Projects
Commit 0b3e2534 authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

archbuild: Add systemd conf for devtools resource control

Leveraging devtools 1.0.4, install systemd snippets which
  - distribute CPU and IO equally between users,
  - distribute CPU and IO equally between build containers of a user,
  - prefer distributing CPU and IO to things that are not build
    containers, and
  - copy our user oomd config for users to apply to build containers.
parent 378a7b4f
No related branches found
No related tags found
No related merge requests found
[Scope]
CPUWeight=100
IOWeight=100
[Slice]
CPUWeight=20
IOWeight=20
ManagedOOMMemoryPressure=kill
ManagedOOMMemoryPressureLimit=60%
......@@ -58,8 +58,21 @@
- mkpkg@.timer
- mkpkg@.service
- name: Install user-.slice snippet
copy: src=user-.slice.d dest=/etc/systemd/system owner=root group=root mode=0644
- name: Create drop-in directories for devtools
file: path=/etc/systemd/system/{{ item }}.d state=directory owner=root group=root mode=0755
with_items:
- arch-nspawn-.scope
- devtools.slice
- user-.slice
- name: Install drop-in snippets for devtools
copy: src=devtools-override_{{ item }}.conf dest=/etc/systemd/system/{{ item }}.d/override.conf owner=root group=root mode=0644
with_items:
- arch-nspawn-.scope
- devtools.slice
- user-.slice
notify:
- Daemon reload
- name: Start and enable archbuild mounts
service: name={{ item }} enabled={{ "yes" if archbuild_fs == 'tmpfs' else "no" }} state={{ "started" if archbuild_fs == 'tmpfs' else "stopped" }}
......
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