Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2025 11:20:32 -0500
From:      FreeBSD Louisville <freebsdlouisville@gmail.com>
To:        Antranig Vartanian <antranigv@freebsd.am>, freebsd-virtualization@freebsd.org
Subject:   Re: Can I allocate some CPUs to the bhyve host?
Message-ID:  <44660ee3-938a-42ab-8c19-2d1c8d655780@Gmail.com>
In-Reply-To: <13C5B773-5437-4087-9A88-AFD6C4A0F021@freebsd.am>
References:  <978106d8-1ad0-4227-a387-aa4bece0b156@Gmail.com> <13C5B773-5437-4087-9A88-AFD6C4A0F021@freebsd.am>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <freebsdlouisville@gmail.com> 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?
>>
>>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44660ee3-938a-42ab-8c19-2d1c8d655780>