Some VM configurations may result in a large number of threads
created by
the associated qemu process which can exceed the system default limit. The
maximum number of threads allowed per process is controlled by the pids
cgroup controller and is set to 16k when creating VMs with systemd's
machined service. The maximum number of threads per process is recorded
in the pids.max file under the machine's pids controller cgroup hierarchy,
e.g.
$cgrp-mnt/pids/machine.slice/machine-qemu\\x2d1\\x2dtest.scope/pids.max
Maximum threads per process is controlled with the TasksMax property of
the systemd scope for the machine. This patch adds an option to qemu.conf
which can be used to override the maximum number of threads allowed per
qemu process. If the value of option is greater than zero, it will be set
in the TasksMax property of the machine's scope after creating the machine.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
Rebase and resend of
https://www.redhat.com/archives/libvir-list/2019-June/msg00185.html
src/lxc/lxc_cgroup.c | 1 +
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 10 ++++++++++
src/qemu/qemu_cgroup.c | 1 +
src/qemu/qemu_conf.c | 2 ++
src/qemu/qemu_conf.h | 1 +
src/qemu/test_libvirtd_qemu.aug.in | 1 +
src/util/vircgroup.c | 6 +++++-
src/util/vircgroup.h | 1 +
src/util/virsystemd.c | 24 +++++++++++++++++++++++-
src/util/virsystemd.h | 3 ++-
tests/virsystemdtest.c | 12 ++++++------
12 files changed, 54 insertions(+), 9 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange(a)redhat.com>
Regards,
Daniel
--
|: