mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2025-01-18 08:06:16 +01:00
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.
This commit is contained in:
parent
378a7b4f40
commit
0b3e253433
@ -0,0 +1,3 @@
|
||||
[Scope]
|
||||
CPUWeight=100
|
||||
IOWeight=100
|
@ -0,0 +1,5 @@
|
||||
[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" }}
|
||||
|
Loading…
Reference in New Issue
Block a user