From nobody Sat Feb 15 16:20:32 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 4YwDfr17gvz5nlyw for ; Sat, 15 Feb 2025 16:20:36 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YwDfq6LNLz3Yxv for ; Sat, 15 Feb 2025 16:20:35 +0000 (UTC) (envelope-from freebsdlouisville@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-471d762a4b2so10997871cf.0 for ; Sat, 15 Feb 2025 08:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739636435; x=1740241235; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:content-language:references :to:subject:user-agent:mime-version:date:message-id:from:from:to:cc :subject:date:message-id:reply-to; bh=vsWxkzvkAyhuDIwfVobVXWG1LvGUL8kbf0fKwWaMIQc=; b=lt7Nh5rMhcYHAych1mNJwDjyx3PtOODonj1/Fcp2QhN2Gf/Yrbn6Z/R3S4D2RmZoxZ N9wRNNtN4V8Wu02yvF8BTTgsxi3ifVTuVtgCnmYUquvbAk3KtwNS/RjB0GbzIZO2hkRJ JKGfns3AFsDqSTR9i4Q+ha1FHUVRVDGu3miL60m2PDD3nIKl/pkSDsTQ5QbJZL9tjxsY 6HlYY+LtxDbxYhRFriU1j6krSqRJfyDUiD/DDqMZmMa6jW1EpRF0H0NgPLrU0V2k00/v Q8A66OhA4DNwbaR/IhRTqzTjattYLU5Qk/EoHNVwRLgUk7EiFv098WmEYOpZqCmcysu+ gdkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739636435; x=1740241235; h=content-transfer-encoding:in-reply-to:content-language:references :to:subject:user-agent:mime-version:date:message-id:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vsWxkzvkAyhuDIwfVobVXWG1LvGUL8kbf0fKwWaMIQc=; b=k6McJVCPwh0kpqjV/AaOKZajywp8IjUFjTklekR1TP8xrlLoSrLl1cZcGacPEnBPRj l5BmJhtmTbSw+YRg3KdnR9+ZRP/xjGewyTpQyhNm/x67YfB925oQmxbJYbseVu9oeWeX vqv/fyuJ1m70nXjZzaBZqnvSX9PlF6OL//9ru97cfF9CX1m/Xo5PLfWLTiKd8trpr3wx o2p7hEK649tb1RWXK3joSK8SR8mA7JFbDwJXQIwbAcz21rCvbdRGaWZDJODLeKQt60uc rLKx+8pufuLTOaUAUOjqJ5BKA4StyBUvsdixOfLn3C5FJq2liYSyhcv66QCuPS5jUs/s 8WlQ== X-Forwarded-Encrypted: i=1; AJvYcCU4j+M5OrasNtiyY4JyEI2XdtJApaddmXxao9lBLXnhw0I+iXawfhbnHOt8xHiDm5Mhud62aKDjJuEsgv0F1lRqdLQeIH15@freebsd.org X-Gm-Message-State: AOJu0Yx9teUtEXMJ3bHsMMBJlbtjgVFVxuuUJNCqkzitAF2PcptBpJwM AguA5mcelAtwC52GlIV5PgnS9PrH1PKGB9YaxCCCxq0o8pEYdCIY X-Gm-Gg: ASbGncsrGMjJE0RliA+iLzMqP4qJYH08snfEsKk7UWaSMVnPaiDOf+EZXUJ+yS//7/J 2PBgxbwzOb+m/OfLBSB/3tJGYRKMjUnZ52D3CkytLY8AEExLpI+gF09kr9H1O72ziz1T00ua6Vu JHmgSVbw3plUurBliwtGt9pr6j5HrN+fa3a+7cx0bsk8fN+D8EPVmnUS99IiE2sf96+quVFhD8q 8k1wwBDbf8SNuy3AE+LSwwF1fSVLlOpFEmFnFBSpa3TAKde6xahFTiB0uEm8u79CnkwDG3RBQyX XO2QKaun5vjMNOh9XS3AAueOBJ+t5janKTYBGN2qZSbg7p5LrR1LOnKEPajvI2Tna0PIbcMAKw= = X-Google-Smtp-Source: AGHT+IHgmr/RYyexXLlHddjO3t6ipr/F3civBZmlswev43Oiqds3NuFThBG/C8XA9zlJY+ZXmGnljQ== X-Received: by 2002:ac8:5d0f:0:b0:471:bdb8:c4d with SMTP id d75a77b69052e-471dbd572eamr47778101cf.28.1739636435015; Sat, 15 Feb 2025 08:20:35 -0800 (PST) Received: from ?IPV6:2600:1015:a030:7620:5a80:a579:2c9e:9ca? ([2600:1015:a030:7620:5a80:a579:2c9e:9ca]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-471c2a30bb4sm29155841cf.43.2025.02.15.08.20.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 Feb 2025 08:20:33 -0800 (PST) From: FreeBSD Louisville X-Google-Original-From: FreeBSD Louisville Message-ID: <44660ee3-938a-42ab-8c19-2d1c8d655780@Gmail.com> Date: Sat, 15 Feb 2025 11:20:32 -0500 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 User-Agent: Mozilla Thunderbird Subject: Re: Can I allocate some CPUs to the bhyve host? To: Antranig Vartanian , freebsd-virtualization@freebsd.org References: <978106d8-1ad0-4227-a387-aa4bece0b156@Gmail.com> <13C5B773-5437-4087-9A88-AFD6C4A0F021@freebsd.am> Content-Language: en-US In-Reply-To: <13C5B773-5437-4087-9A88-AFD6C4A0F021@freebsd.am> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4YwDfq6LNLz3Yxv X-Spamd-Bar: ---- Thanks for the quick response and your time. I may have confused the issue. I want to dedicate a certain number of CPUs to the host, thereby assuring CPUs are not over-provisioned to guests. On 2/15/25 10:40, Antranig Vartanian wrote: > I think you can. > > bhyve has an option named -p which maps the vcpu to the host cpu. In our > cluster we have the following in vm-bhyve’s config file: > > bhyve_options="-p 0:28 -p 100:156 -p 1:29 -p 101:157 -p 2:30 -p 102:158 -p 3:31 > -p 103:159 -p 4:32 -p 104:160 -p 5:33 -p 105:161 -p 6:34 -p 106:162 […] 197:253 > -p 98:126 -p 198:254 -p 99:127 -p 199:255” > > Now, to be fair I am matching a single vCPU to a host CPU (and then using the > cpuset subsystem to “Detach” that cpu from the host), but I don’t see a reason why > you would not be able to match multiple vCPUs to a single host CPU. (someone > correct me if I'm wrong). > > Hope this helps. > > — > Antranig Vartanian > https://antranigv.am/ > PGP Key ID: 0x2D59F21C > >> On 15 Feb 2025, at 7:34 PM, FreeBSD Louisville wrote: >> >> 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? >> >>