Limit koschei-resolver memory usage
This limits real memory usage, virtual memory is not limited - resolver won't use more than 2G of *real* memory (RAM), virtual memory exceeding that limit will be swapped to disk. This should leave more real memory for other services and disk cache, while allowing koschei-resolver to keep older sacks in swap (loading sack from swap should be faster than reloading it from repo files).
This commit is contained in:
parent
bcc7b5cdf6
commit
cdf6a5e1c7
2 changed files with 13 additions and 0 deletions
2
roles/koschei/backend/files/systemd-memory-limit.conf
Normal file
2
roles/koschei/backend/files/systemd-memory-limit.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
[Service]
|
||||
MemoryLimit=2G
|
|
@ -21,6 +21,17 @@
|
|||
- koschei
|
||||
- packages
|
||||
|
||||
- name: install systemd config files
|
||||
copy: >
|
||||
src=systemd-memory-limit.conf
|
||||
dest=/etc/systemd/system/koschei-resolver.service.d/memory-limit.conf
|
||||
notify:
|
||||
- reload systemd
|
||||
- restart koschei-resolver
|
||||
tags:
|
||||
- koschei
|
||||
- config
|
||||
|
||||
- name: install config files
|
||||
when: env == "staging"
|
||||
template: >
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue