summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-13 19:38:40 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-16 11:58:04 +0100
commit541ec33075f9f2461b5286592312d2b50295ad32 (patch)
tree35bcd3ae5cf00d64fbc12a42bb45b1b10b010c86
parenta5bc6e5450981e1f3f88e083f5070038a0211b74 (diff)
nspawn: set TasksMax= for containers to 8192 by default
-rw-r--r--src/nspawn/nspawn-register.c4
-rw-r--r--units/systemd-nspawn@.service.in1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/nspawn/nspawn-register.c b/src/nspawn/nspawn-register.c
index 374f958c20..50871464c5 100644
--- a/src/nspawn/nspawn-register.c
+++ b/src/nspawn/nspawn-register.c
@@ -105,6 +105,10 @@ int register_machine(
return bus_log_create_error(r);
}
+ r = sd_bus_message_append(m, "(sv)", "TasksMax", "t", 8192);
+ if (r < 0)
+ return bus_log_create_error(r);
+
r = sd_bus_message_append(m, "(sv)", "DevicePolicy", "s", "strict");
if (r < 0)
return bus_log_create_error(r);
diff --git a/units/systemd-nspawn@.service.in b/units/systemd-nspawn@.service.in
index 2e79adff44..eb10343ac6 100644
--- a/units/systemd-nspawn@.service.in
+++ b/units/systemd-nspawn@.service.in
@@ -20,6 +20,7 @@ RestartForceExitStatus=133
SuccessExitStatus=133
Slice=machine.slice
Delegate=yes
+TasksMax=8192
# Enforce a strict device policy, similar to the one nspawn configures
# when it allocates its own scope unit. Make sure to keep these