From nobody Mon Feb 9 16:02:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1696236703; cv=none; d=zohomail.com; s=zohoarc; b=TQEcdoEiOaI5dNDRDeMwjOKzUynds5D1+knvxXs/E+PGRZ/bxClPJ02PzE3tjvUbzG/fKN11L85TSpV2kkhX7ZJK/S25pNyPIstU5qGO9Kg2sCi9NeI5fx+M6/O0BIFCbF2xtsTu6Jcu5Q+D6VTF/odCaAXM1+bonJRyjRK0xZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236703; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1zrOLiO86kxzRk8dvPxSgZwokZmuwR9ENKc+KPijl+w=; b=H87im/AaGEC+khhFMVLEzPLAxWVq1b+6GK/aw3tIP9Sy3XdmUgkPe5HlPG7V85z2qyQH62DdTpyI0e72uRhjMPopZBEGcJtSg7LVnBpLNAmobLEwYFj9ERDTSqDeABAsIJs1/yz876d4qJnuPtgektGu19edaByCmOnZkQULDo4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1696236703000254.34979443003806; Mon, 2 Oct 2023 01:51:43 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-438-kZHjkECwO6CNjQv_DMaMLw-1; Mon, 02 Oct 2023 04:51:38 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4BB7C81DB71; Mon, 2 Oct 2023 08:51:33 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3648E40C6EC0; Mon, 2 Oct 2023 08:51:33 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BB1DC1946A5A; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1436A1946595 for ; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E972BC154CC; Mon, 2 Oct 2023 08:51:31 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 80934C154CA for ; Mon, 2 Oct 2023 08:51:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236701; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=1zrOLiO86kxzRk8dvPxSgZwokZmuwR9ENKc+KPijl+w=; b=GDe+KG5ryJ/NjNgmRDIHFoA+R8p6NjTZPefN3eboUgsJfpGVrcI0UW2/6/5Zxj2e83QJFW k2JM2cUUJn87jFrE/so+UdnSBhBFXHcpL2CxeTsZXqz2wkNwQyEN4adzTbuWgNLj4l34PJ DHrHWMU8obRKByBAt71UxCnkDjXMqd8= X-MC-Unique: kZHjkECwO6CNjQv_DMaMLw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 05/11] systemd: Introduce systemd_service_taskmax_extra Date: Mon, 2 Oct 2023 10:51:20 +0200 Message-ID: <20231002085126.210149-6-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1696236704684100007 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani --- src/ch/meson.build | 1 + src/ch/virtchd.service.extra.in | 5 ----- src/lxc/meson.build | 1 + src/lxc/virtlxcd.service.extra.in | 5 ----- src/meson.build | 1 + src/qemu/meson.build | 1 + src/qemu/virtqemud.service.extra.in | 5 ----- src/remote/libvirtd.service.in | 5 ----- src/remote/meson.build | 1 + src/virtd.service.tasksmax.extra.in | 6 ++++++ 10 files changed, 11 insertions(+), 20 deletions(-) create mode 100644 src/virtd.service.tasksmax.extra.in diff --git a/src/ch/meson.build b/src/ch/meson.build index 0760d1f8e1..9eecf8c27f 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -61,6 +61,7 @@ if conf.has('WITH_CH') 'service_extra_in': [ files('virtchd.service.extra.in'), systemd_service_limitnofile_extra_in, + systemd_service_taskmax_extra_in, ], } =20 diff --git a/src/ch/virtchd.service.extra.in b/src/ch/virtchd.service.extra= .in index 626cf0a21b..38d820c1af 100644 --- a/src/ch/virtchd.service.extra.in +++ b/src/ch/virtchd.service.extra.in @@ -5,11 +5,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# 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=3D32768 # 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 diff --git a/src/lxc/meson.build b/src/lxc/meson.build index 0c4d51d8b9..fb1aedb5fc 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -168,6 +168,7 @@ if conf.has('WITH_LXC') 'service_extra_in': [ files('virtlxcd.service.extra.in'), systemd_service_limitnofile_extra_in, + systemd_service_taskmax_extra_in, ], } =20 diff --git a/src/lxc/virtlxcd.service.extra.in b/src/lxc/virtlxcd.service.e= xtra.in index 626cf0a21b..38d820c1af 100644 --- a/src/lxc/virtlxcd.service.extra.in +++ b/src/lxc/virtlxcd.service.extra.in @@ -5,11 +5,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# 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=3D32768 # 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 diff --git a/src/meson.build b/src/meson.build index a9e6b521ee..37239fd969 100644 --- a/src/meson.build +++ b/src/meson.build @@ -195,6 +195,7 @@ guest_unit_files =3D [] # snippets that are shared by multiple units # can be used in service_extra_in/socket_extra_in (see below) systemd_service_limitnofile_extra_in =3D files('virtd.service.limitnofile.= extra.in') +systemd_service_taskmax_extra_in =3D files('virtd.service.tasksmax.extra.i= n') =20 # virt_daemon_units: # generate libvirt daemon systemd unit files diff --git a/src/qemu/meson.build b/src/qemu/meson.build index 09f79f52ee..b28089aa06 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -187,6 +187,7 @@ if conf.has('WITH_QEMU') 'service_extra_in': [ files('virtqemud.service.extra.in'), systemd_service_limitnofile_extra_in, + systemd_service_taskmax_extra_in, ], } =20 diff --git a/src/qemu/virtqemud.service.extra.in b/src/qemu/virtqemud.servi= ce.extra.in index 48b349b48a..164f672c08 100644 --- a/src/qemu/virtqemud.service.extra.in +++ b/src/qemu/virtqemud.service.extra.in @@ -9,11 +9,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# 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=3D32768 # 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 diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in index 8dc6df2138..900b734f82 100644 --- a/src/remote/libvirtd.service.in +++ b/src/remote/libvirtd.service.in @@ -33,11 +33,6 @@ ExecStart=3D@sbindir@/libvirtd $LIBVIRTD_ARGS ExecReload=3D/bin/kill -HUP $MAINPID KillMode=3Dprocess Restart=3Don-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=3D32768 # 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 togeth= er diff --git a/src/remote/meson.build b/src/remote/meson.build index e2960195f7..898131424f 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -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_taskmax_extra_in, ], 'name': 'legacy monolithic', 'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ], diff --git a/src/virtd.service.tasksmax.extra.in b/src/virtd.service.tasksm= ax.extra.in new file mode 100644 index 0000000000..2ea2939425 --- /dev/null +++ b/src/virtd.service.tasksmax.extra.in @@ -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=3D32768 --=20 2.41.0