Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Mar 2023 17:29:08 +0100
From:      Guido Falsi <mad@madpilot.net>
To:        =?UTF-8?Q?Julie_Koubov=c3=a1?= <julie@koubova.net>, freebsd-virtualization@freebsd.org
Subject:   Re: Bhyve process consumes way too much CPU
Message-ID:  <80da3a32-4c4c-5135-88b5-99419709ede9@madpilot.net>
In-Reply-To: <bddc03a0-46a4-f81e-d473-afe8cc735c92@madpilot.net>
References:  <CABQ-j0ZH-OrZSb866iVMba-ZfxOsovGoyLd=YZ=auOiNtm-TkA@mail.gmail.com> <CABQ-j0bbTQWhM1wgYvDvvwpxQexqgtYDgN4vj8pYp2Ttu_WHHg@mail.gmail.com> <bddc03a0-46a4-f81e-d473-afe8cc735c92@madpilot.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 18/03/23 17:14, Guido Falsi wrote:
> On 18/03/23 14:59, Julie Koubová wrote:
>> Hey everyone,
>>
>> I'm running Linux (Home Assistant OS) in Bhyve on FreeBSD 13.1. I use 
>> PCI passthrough to allow the VM to access a USB card with a couple of 
>> radio dongles. The host machine is an Intel Core i3 13100 with 64 GB 
>> of RAM. The CPU has 4 physical cores (8 hyper-threaded). The virtual 
>> machine is assigned four cores.
>>
>> The host load averages are 0.39 0.39 0.40 right now, which seems way 
>> too much. The same workload was previously handled by a Raspberry Pi 
>> 4, and the CPU usage there was under 10% when not doing anything 
>> special. Inside the guest OS, the CPU usage is reported around 5%, 
>> which seems reasonable.
> 
> I cannot give any definitive information, and know nothing about Home 
> Assistant OS but I see a problem with your reasoning here, you're 
> comparing CPU usage with system load, which is apples to oranges; they 
> are measuring two different things (albeit related to each other).
> 
> It is quite possible to have a relatively high load with low CPU usage, 
> in fact I think I can see that happen when using virtual machines, since 
> they also have to handle their own internal interrupts and the like and 
> will be often ready to run, adding to the load, but actually doing very 
> little CPU work.
> 
> So you should compare load to load and CPU usage to CPU usage. In 
> relation to a raspberry I expect load to not be significantly lower for 
> this kind of work, but actual CPU usage to be noticeably lower, but not 
> near zero.

BTW, I forgot to mention that any load average less than the number of 
available threads means the machine is not fully loaded, so 0.50 for a 4 
CPU, 8 threads machine is quite low by any measurements, while 0.50 on a 
machine with half the available CPUs/threads means double the actual 
load for that hardware. That should be accounted too.

-- 
Guido Falsi <mad@madpilot.net>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80da3a32-4c4c-5135-88b5-99419709ede9>