From nobody Sat Feb 15 15:40:57 2025 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YwCnC6KHBz5njNf for ; Sat, 15 Feb 2025 15:41:03 +0000 (UTC) (envelope-from antranigv@freebsd.am) Received: from fhigh-b3-smtp.messagingengine.com (fhigh-b3-smtp.messagingengine.com [202.12.124.154]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4YwCnB64G4z48dZ for ; Sat, 15 Feb 2025 15:41:02 +0000 (UTC) (envelope-from antranigv@freebsd.am) Authentication-Results: mx1.freebsd.org; none Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.stl.internal (Postfix) with ESMTP id F191A254018A; Sat, 15 Feb 2025 10:41:01 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Sat, 15 Feb 2025 10:41:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.am; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1739634061; x=1739720461; bh=4eUOu9Ph7z Xyvyf+D+s4iM0V7p3vD5L2oIEiUJTX9nI=; b=o+gCquxg98SBqmokGA0b9CWc6W +4xWwLy9v1gkDqIPMSuXTgjlF3VnSF0tsh5zvnSzbI2gTM19E+shORihs+X/7hkB reQei0jg7R+1WdjCrGg02S74Z7CcwjVjt8vih1eZYXaVTMMOAKHta0tKOFf8yB1X EiWKjdy5rWsgNAel+dYF+FRusRi5/qcTQuVVe0cF/r/7qmHHB2lNCySSUxBTS3K+ VEwfmPMWtnEsC0hwAEL1g4reG5GfByztJkSoUqbH2CRKzypy8MhKYhKBhRvB4nqk hd9soML9xVsG0/s81y+HZTUSy9ErqF67D3LVBm98/snWhGwi6XecsWw72VYg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1739634061; x=1739720461; bh=4eUOu9Ph7zXyvyf+D+s4iM0V7p3vD5L2oIE iUJTX9nI=; b=xDiL1SFu76CTzkRXAnbsbPL83UyDRQDfj2WmlUACTFRkZVV4smH X5dn6WIiZnqY0YX0H7MNvQ2pIMJsxAaCAWwQQ8AEybJs5pas3OdLjfVzprTQP8Di Ia5rDlxzQGVGrALpBTAeC5a2gkAIdv22lWFbHzHOcxaRcZmH87D3+bJJjCMlHm+R kR5aQiNobpFhx+hzA8VIBhqWC6POsO+1efKvh/kIXj6KnztlOyS8bmnoZv/Sb2tx jBLG+UP4UWMo4iuTg3MEkXZk8rer1Y9RCSP9xT8i2L0dOv4ze+Sm5LpfjmXTbRSn g8VcEyFQX2twCDy/I0w3msP1qd7xfMMVwYg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehvdelfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpegtggfuhfgjffevkfhfvffosehgtdhmrehhtdej necuhfhrohhmpeetnhhtrhgrnhhighcugggrrhhtrghnihgrnhcuoegrnhhtrhgrnhhigh hvsehfrhgvvggsshgurdgrmheqnecuggftrfgrthhtvghrnhepfefghfehkeduieffhffg hfegffffteffvefgtdehueevgeeliefhvdehudduieetnecuffhomhgrihhnpegrnhhtrh grnhhighhvrdgrmhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpegrnhhtrhgrnhhighhvsehfrhgvvggsshgurdgrmhdpnhgspghrtghpthhtoh epvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepfhhrvggvsghsughlohhuihhs vhhilhhlvgesghhmrghilhdrtghomhdprhgtphhtthhopehfrhgvvggsshguqdhvihhrth hurghlihiirghtihhonhesfhhrvggvsghsugdrohhrgh X-ME-Proxy: Feedback-ID: ibc494664:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 15 Feb 2025 10:41:00 -0500 (EST) Content-Type: multipart/signed; boundary="Apple-Mail=_0410613E-24B4-4590-8186-CED5918654A6"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.1\)) Subject: Re: Can I allocate some CPUs to the bhyve host? From: Antranig Vartanian In-Reply-To: <978106d8-1ad0-4227-a387-aa4bece0b156@Gmail.com> Date: Sat, 15 Feb 2025 19:40:57 +0400 Cc: freebsd-virtualization@freebsd.org Message-Id: <13C5B773-5437-4087-9A88-AFD6C4A0F021@freebsd.am> References: <978106d8-1ad0-4227-a387-aa4bece0b156@Gmail.com> To: FreeBSD Louisville X-Mailer: Apple Mail (2.3776.700.51.11.1) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: 4YwCnB64G4z48dZ X-Spamd-Bar: ---- --Apple-Mail=_0410613E-24B4-4590-8186-CED5918654A6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I think you can. bhyve has an option named -p which maps the vcpu to the host cpu. In our=20= cluster we have the following in vm-bhyve=E2=80=99s config file: bhyve_options=3D"-p 0:28 -p 100:156 -p 1:29 -p 101:157 -p 2:30 -p = 102:158 -p 3:31=20 -p 103:159 -p 4:32 -p 104:160 -p 5:33 -p 105:161 -p 6:34 -p 106:162 = [=E2=80=A6] 197:253=20 -p 98:126 -p 198:254 -p 99:127 -p 199:255=E2=80=9D Now, to be fair I am matching a single vCPU to a host CPU (and then = using the=20 cpuset subsystem to =E2=80=9CDetach=E2=80=9D that cpu from the host), = but I don=E2=80=99t see a reason why=20 you would not be able to match multiple vCPUs to a single host CPU. = (someone=20 correct me if I'm wrong). Hope this helps. =E2=80=94 Antranig Vartanian https://antranigv.am/ PGP Key ID: 0x2D59F21C > On 15 Feb 2025, at 7:34=E2=80=AFPM, FreeBSD Louisville = wrote: >=20 > It appears to me that a user could over-provision CPUs to guests, = causing massive slowdown of the system. Can I specify CPUs to be = "locked" to the host? If I have 16 processors available, could I start = guests that want 32 CPUs? >=20 >=20 --Apple-Mail=_0410613E-24B4-4590-8186-CED5918654A6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElMZjj3yN+bx0tQ6G3jmYZi1Z8hwFAmewtYkACgkQ3jmYZi1Z 8hwq0g//QYFTeLKUw/55dEerGi3fQn6U85v1stL8hrDsTd6jVGL2W/j5j9mjyK6A LlZLyEM+JRUdF6Fu3mjIYiww7fTKIbVQ1ZF6UgW/mp9pzLn+eEDpqso/nw1X/j62 IAWhF75mtFsql2+Vj2b7/DxofJXZHP2O1/CMdxdsF5vBuG8QPD6YNNAQdlHlBBxI Z7Yjrra0uMmBvxKaEhdtfiF6W1U0GvxUwvN0zhNYu2xloq9T4mJ0ugdkiqjQS7Kk 4SKDYLAHYAs3Yd7uM071w7iLSuOoyOqiK8E0z9GXiBzen2cCo6AEdsfUiNCaiEhD M+rpXTtGiKqtAEdzCZbd3QNgblcdVY8XfS7JVIJRlMFs+O+16d7oUM5d8NbjXaHM YEAkxl2R/ggmVog/Gs94+tOtL82434N9fmWyVQwvwmrhlqZA7qQg60MCabYNsv7R rziOolp67/uVtfxKHSddPr/oZmGsD20UKtpKvmsEeR+NpMbpvgvi/DSJD4EamM3B O+Tr1nlz5fRgX+iOxPOXH32a2gGHkixNzdWC9O+A1/voRZDnauJS3dpRmKWhcKDm zQhJ7hUkaX/XTNGYjz39t6DuygeFfZbBCwc9Q+R3FOvaL3cDXIha4J+5hnKTONMn ow9P+XrDP5XQ7pgFM2veUIx5/nrZXVzcAyUEY6XRyamx3kwUW10= =izf9 -----END PGP SIGNATURE----- --Apple-Mail=_0410613E-24B4-4590-8186-CED5918654A6--