]> xenbits.xensource.com Git - libvirt.git/commitdiff
systemd: Introduce systemd_service_tasksmax_extra_in
authorAndrea Bolognani <abologna@redhat.com>
Thu, 28 Sep 2023 10:07:15 +0000 (12:07 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 25 Oct 2023 10:19:24 +0000 (12:19 +0200)
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/ch/meson.build
src/ch/virtchd.service.extra.in
src/lxc/meson.build
src/lxc/virtlxcd.service.extra.in
src/meson.build
src/qemu/meson.build
src/qemu/virtqemud.service.extra.in
src/remote/libvirtd.service.in
src/remote/meson.build
src/virtd.service.tasksmax.extra.in [new file with mode: 0644]

index 604329e9c7e1781b092a8bb37c4bb58ceb936f83..65215f1cb021b9178f5c85dbf0f7c62607682d8e 100644 (file)
@@ -63,6 +63,7 @@ if conf.has('WITH_CH')
     'service_extra_in': [
       files('virtchd.service.extra.in'),
       systemd_service_limitnofile_extra_in,
+      systemd_service_tasksmax_extra_in,
     ],
   }
 
index 626cf0a21b4a08537447f66418675168992c1ad3..38d820c1afaf92ef950b461e15c12be4a8badf7d 100644 (file)
@@ -5,11 +5,6 @@ After=remote-fs.target
 
 [Service]
 KillMode=process
-# The cgroups pids controller can limit the number of tasks started by
-# the daemon, which can limit the number of domains for some hypervisors.
-# A conservative default of 8 tasks per guest results in a TasksMax of
-# 32k to support 4096 guests.
-TasksMax=32768
 # With cgroups v2 there is no devices controller anymore, we have to use
 # eBPF to control access to devices. In order to do that we create a eBPF
 # hash MAP which locks memory. The default map size for 64 devices together
index 0c4d51d8b941235b908ed0e88cec2204bc4c47da..338be79f7c894407a8b8b214fc3d350d51a5814d 100644 (file)
@@ -168,6 +168,7 @@ if conf.has('WITH_LXC')
     'service_extra_in': [
       files('virtlxcd.service.extra.in'),
       systemd_service_limitnofile_extra_in,
+      systemd_service_tasksmax_extra_in,
     ],
   }
 
index 626cf0a21b4a08537447f66418675168992c1ad3..38d820c1afaf92ef950b461e15c12be4a8badf7d 100644 (file)
@@ -5,11 +5,6 @@ After=remote-fs.target
 
 [Service]
 KillMode=process
-# The cgroups pids controller can limit the number of tasks started by
-# the daemon, which can limit the number of domains for some hypervisors.
-# A conservative default of 8 tasks per guest results in a TasksMax of
-# 32k to support 4096 guests.
-TasksMax=32768
 # With cgroups v2 there is no devices controller anymore, we have to use
 # eBPF to control access to devices. In order to do that we create a eBPF
 # hash MAP which locks memory. The default map size for 64 devices together
index a9e6b521ee2da6e36ccf313ab311ec7197593951..ee88c99987904ae23f8afc2495d4197e8f14e28a 100644 (file)
@@ -195,6 +195,7 @@ guest_unit_files = []
 #   snippets that are shared by multiple units
 #   can be used in service_extra_in/socket_extra_in (see below)
 systemd_service_limitnofile_extra_in = files('virtd.service.limitnofile.extra.in')
+systemd_service_tasksmax_extra_in = files('virtd.service.tasksmax.extra.in')
 
 # virt_daemon_units:
 #   generate libvirt daemon systemd unit files
index 09f79f52eec3019cfb281a6e7e221a677446faef..ee4c8ab5bf51bc1021f8274db2cde88afb026845 100644 (file)
@@ -187,6 +187,7 @@ if conf.has('WITH_QEMU')
     'service_extra_in': [
       files('virtqemud.service.extra.in'),
       systemd_service_limitnofile_extra_in,
+      systemd_service_tasksmax_extra_in,
     ],
   }
 
index 48b349b48ad922270bb74d0dfa8d8193fa7ce8df..164f672c08287044af17a43e64e6d391c8881dbd 100644 (file)
@@ -9,11 +9,6 @@ After=remote-fs.target
 
 [Service]
 KillMode=process
-# The cgroups pids controller can limit the number of tasks started by
-# the daemon, which can limit the number of domains for some hypervisors.
-# A conservative default of 8 tasks per guest results in a TasksMax of
-# 32k to support 4096 guests.
-TasksMax=32768
 # With cgroups v2 there is no devices controller anymore, we have to use
 # eBPF to control access to devices. In order to do that we create a eBPF
 # hash MAP which locks memory. The default map size for 64 devices together
index 8dc6df2138e9d4c3085c82ab1ea294f81190aaf1..900b734f826da763f20956862244643e7f5998e5 100644 (file)
@@ -33,11 +33,6 @@ ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
 KillMode=process
 Restart=on-failure
-# The cgroups pids controller can limit the number of tasks started by
-# the daemon, which can limit the number of domains for some hypervisors.
-# A conservative default of 8 tasks per guest results in a TasksMax of
-# 32k to support 4096 guests.
-TasksMax=32768
 # With cgroups v2 there is no devices controller anymore, we have to use
 # eBPF to control access to devices.  In order to do that we create a eBPF
 # hash MAP which locks memory.  The default map size for 64 devices together
index e2960195f7be3969c048d5b30222c8d4e82c3ad6..f9291099ab978fb68f16288c41d25a06046462a9 100644 (file)
@@ -193,6 +193,7 @@ if conf.has('WITH_REMOTE')
       'service_in': files('libvirtd.service.in'),
       'service_extra_in': [
         systemd_service_limitnofile_extra_in,
+        systemd_service_tasksmax_extra_in,
       ],
       'name': 'legacy monolithic',
       'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ],
diff --git a/src/virtd.service.tasksmax.extra.in b/src/virtd.service.tasksmax.extra.in
new file mode 100644 (file)
index 0000000..2ea2939
--- /dev/null
@@ -0,0 +1,6 @@
+[Service]
+# The cgroups pids controller can limit the number of tasks started by
+# the daemon, which can limit the number of domains for some hypervisors.
+# A conservative default of 8 tasks per guest results in a TasksMax of
+# 32k to support 4096 guests.
+TasksMax=32768