summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-06-09 21:03:02 +0200
committerMax Kellermann <max@musicpd.org>2020-06-09 21:09:00 +0200
commitc031f9aa5d7a516af488f4cd4d9c22c4dc748439 (patch)
tree44d8e8ac18be51995af84fe1c9ffc9850f2a9856
parent068006ebd7a71e7283550c7c6d569585f6f2e665 (diff)
systemnd: configure LimitMEMLOCK for io_uring
The io_uring buffer is allocated as memlocked memory, as MPD needs to be able to lock memory.
-rw-r--r--systemd/system/mpd.service.in3
-rw-r--r--systemd/user/mpd.service.in3
2 files changed, 6 insertions, 0 deletions
diff --git a/systemd/system/mpd.service.in b/systemd/system/mpd.service.in
index 1086eed1a..4f4c9fff0 100644
--- a/systemd/system/mpd.service.in
+++ b/systemd/system/mpd.service.in
@@ -16,6 +16,9 @@ ExecStart=@prefix@/bin/mpd --no-daemon
LimitRTPRIO=40
LimitRTTIME=infinity
+# for io_uring
+LimitMEMLOCK=64M
+
# disallow writing to /usr, /bin, /sbin, ...
ProtectSystem=yes
diff --git a/systemd/user/mpd.service.in b/systemd/user/mpd.service.in
index 0f8c3e9ee..422f60a92 100644
--- a/systemd/user/mpd.service.in
+++ b/systemd/user/mpd.service.in
@@ -16,6 +16,9 @@ ExecStart=@prefix@/bin/mpd --no-daemon
LimitRTPRIO=40
LimitRTTIME=infinity
+# for io_uring
+LimitMEMLOCK=64M
+
# disallow writing to /usr, /bin, /sbin, ...
ProtectSystem=yes