From 90558f315844ec35e3fd4f1a19ac38c8721c9354 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 13 Nov 2015 18:25:02 +0100 Subject: logind: add a new UserTasksMax= setting to logind.conf This new setting configures the TasksMax= field for the slice objects we create for each user. This alters logind to create the slice unit as transient unit explicitly instead of relying on implicit generation of slice units by simply starting them. This also enables us to set a friendly description for slice units that way. --- src/login/logind.conf | 1 + 1 file changed, 1 insertion(+) (limited to 'src/login/logind.conf') diff --git a/src/login/logind.conf b/src/login/logind.conf index 6df6f04c77..e8f1487734 100644 --- a/src/login/logind.conf +++ b/src/login/logind.conf @@ -32,3 +32,4 @@ #IdleActionSec=30min #RuntimeDirectorySize=10% #RemoveIPC=yes +#UserTasksMax= -- cgit v1.2.3-54-g00ecf From a5bc6e5450981e1f3f88e083f5070038a0211b74 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 13 Nov 2015 19:32:37 +0100 Subject: logind: change default to UserTasksMax= to 4096 --- man/logind.conf.xml | 2 +- src/login/logind.c | 2 +- src/login/logind.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/login/logind.conf') diff --git a/man/logind.conf.xml b/man/logind.conf.xml index 3cde267119..94376656d5 100644 --- a/man/logind.conf.xml +++ b/man/logind.conf.xml @@ -288,7 +288,7 @@ TasksMax= setting of the per-user slice unit, see systemd.resource-control5 - for details. + for details. Defaults to 4096. diff --git a/src/login/logind.c b/src/login/logind.c index c3a2fb5acd..7b41174c64 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -70,7 +70,7 @@ static Manager *manager_new(void) { m->idle_action_not_before_usec = now(CLOCK_MONOTONIC); m->runtime_dir_size = PAGE_ALIGN((size_t) (physical_memory() / 10)); /* 10% */ - m->user_tasks_max = (uint64_t) -1; + m->user_tasks_max = UINT64_C(4096); m->devices = hashmap_new(&string_hash_ops); m->seats = hashmap_new(&string_hash_ops); diff --git a/src/login/logind.conf b/src/login/logind.conf index e8f1487734..81f6695434 100644 --- a/src/login/logind.conf +++ b/src/login/logind.conf @@ -32,4 +32,4 @@ #IdleActionSec=30min #RuntimeDirectorySize=10% #RemoveIPC=yes -#UserTasksMax= +#UserTasksMax=4096 -- cgit v1.2.3-54-g00ecf