Skip to content

Limit user resources on *geniux* #126

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions install.sh
Expand Up @@ -146,6 +146,9 @@ install_data misc_systemd_units/user@.service.d/depend-on-remote-homes.conf \
mkdir -p "$DESTDIR$sysconfdir/systemd/logind.conf.d"
install_data misc_etc_files/systemd/logind.conf.d/disable_RemoveIPC.conf \
"$DESTDIR$sysconfdir/systemd/logind.conf.d/disable_RemoveIPC.conf"
mkdir -p "$DESTDIR$systemdunitdir/user-.slice.d"
install_data misc_systemd_units/20-resource-limits-geniux.conf \
"$DESTDIR$systemdunitdir/user-.slice.d/20-resource-limits-geniux.conf"
install_data logrotate/logrotate.conf "$DESTDIR$sysconfdir/logrotate.conf"
install_data logrotate/logrotate.service "$DESTDIR$systemdunitdir/logrotate.service"
install_data logrotate/logrotate.timer "$DESTDIR$systemdunitdir/logrotate.timer"
Expand Down
20 changes: 20 additions & 0 deletions misc_systemd_units/20-resource-limits-geniux.conf
@@ -0,0 +1,20 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=User Slice of UID %j
Documentation=man:user@.service(5)
After=systemd-user-sessions.service
StopWhenUnneeded=yes
ConditionHost=geniux.molgen.mpg.de
ConditionUser=!0

[Slice]
CPUQuota=100%
MemoryMax=3G