Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Mar 2023 18:04:43 +0100
From:      Mario Marietto <marietto2008@gmail.com>
To:        Nikita Olenets <zeon@zeon.kiev.ua>, =?UTF-8?Q?Julie_Koubov=C3=A1?= <julie@koubova.net>,  Miroslav Lachman <000.fbsd@quip.cz>,  FreeBSD virtualization <freebsd-virtualization@freebsd.org>
Subject:   Re: Bhyve process consumes way too much CPU
Message-ID:  <CA%2B1FSigdN1wpjgi4xJyspjBsJnmUxUzswtwr6Df=8JE9U4jiPw@mail.gmail.com>
In-Reply-To: <CAJ5wse0J%2BJm3KGHMyNSQO%2BApQCEva6o0meAW4xVf3rcKyT8ukA@mail.gmail.com>
References:  <CABQ-j0ZH-OrZSb866iVMba-ZfxOsovGoyLd=YZ=auOiNtm-TkA@mail.gmail.com> <CABQ-j0bbTQWhM1wgYvDvvwpxQexqgtYDgN4vj8pYp2Ttu_WHHg@mail.gmail.com> <343e827b-a1dc-b69b-9dcc-c6675deac070@quip.cz> <CA%2B1FSihrMf77N1Ec1wyndmvmJg5g6Ya9KJjKm9XcsM6o7R5V0g@mail.gmail.com> <CAJ5wse2Oyz%2B=P3ojNz8YqH79fKxJs7uOBzvMu7crkbxg_EykGQ@mail.gmail.com> <CA%2B1FSij5XiJ9o1Sgh8S2-y31XtUJ=GLMo6q6p-w49peApcDM5w@mail.gmail.com> <CAJ5wse0J%2BJm3KGHMyNSQO%2BApQCEva6o0meAW4xVf3rcKyT8ukA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000860cb005f76c0cec
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Yeah,that's another project that I will work on soon. So speak please. I
use bhyve every day.

On Tue, Mar 21, 2023 at 6:00=E2=80=AFPM Nikita Olenets <zeon@zeon.kiev.ua> =
wrote:

> Hey Mario,
>
> Yeah, sorry. I was thinking that you were the topic starter and you were
> trying to make things work under bhyve.
>
> Have a goo day.
>
> =E2=80=94 Nikita
>
> On Tue, Mar 21, 2023 at 12:54 Mario Marietto <marietto2008@gmail.com>
> wrote:
>
>> Are you talking with me ? I can install Home Assistant only on the
>> hardware that I already have. Actually the best piece of hardware that I
>> can use for my project (installing the chat gpt module on Home Assistant=
 +
>> a speech recognition software to give a voice to chat gpt) is the nvidia
>> jetson nano. And If I remember correctly,it supports only Ubuntu. I can =
do
>> the same on my Workstation,but I prefer to have the ability to move the
>> smaller nano within a plastic container. At the end of the day It will b=
e
>> almost the same as a vocal assistant,but uch more programmable.
>>
>> On Tue, Mar 21, 2023 at 5:41=E2=80=AFPM Nikita Olenets <zeon@zeon.kiev.u=
a> wrote:
>>
>>> Hi,
>>>
>>> Is there any specific reason you want it to be installed under Ubuntu?
>>> I=E2=80=99m asking this because I use HasOS(home assistant OS) which is=
 based on
>>> Linux (can=E2=80=99t recall the distribution) and I=E2=80=99m running t=
his for three years
>>> now. No issues at all. I do have even passed through ZigBee usb stick a=
nd
>>> it works just fine.
>>>
>>> On Mon, Mar 20, 2023 at 11:12 Mario Marietto <marietto2008@gmail.com>
>>> wrote:
>>>
>>>> Hello Julie.
>>>>
>>>> As I said some days ago,I'm trying to install homeassistant. For the
>>>> moment I'm using Ubuntu 20.04 that I have installed on the Jetson nano=
,but
>>>> later I will use Ubuntu within bhyve on FreeBSD. Unfortunately,a
>>>> developer,I suppose,told me that homeassistant is not supported on ubu=
ntu.
>>>> In Fact I tried to do that following this tutorial :
>>>>
>>>> https://vikoky.medium.com/jetson-nano-powered-house-29ce73f11de4
>>>>
>>>> but I've got a lot of errors. I've started a thread on reddit,asking
>>>> for help,here :
>>>>
>>>>
>>>> https://www.reddit.com/r/homeassistant/comments/11wglx7/homeassisant_c=
ant_be_installed_on_ubuntu_2004_the/
>>>>
>>>> and he/she told me that ubuntu is not supported. So,which linux
>>>> distribution have you used within bhyve ? thanks.
>>>>
>>>> On Sun, Mar 19, 2023 at 7:12=E2=80=AFPM Miroslav Lachman <000.fbsd@qui=
p.cz>
>>>> wrote:
>>>>
>>>>> On 18/03/2023 14:59, Julie Koubov=C3=A1 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 G=
B
>>>>> 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 wa=
y
>>>>> 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.
>>>>> >
>>>>> > What's wrong? How can I start debugging this issue? I use ZFS on th=
e
>>>>> > host, vm-bhyve to manage the virtual machines, and I don't have a
>>>>> swap
>>>>> > partition.
>>>>>
>>>>> I had similar problem few years ago. Never solved. Exhibited on bhyve
>>>>> and VirtualBox too. The problem was "the more vCPU for VM, the slower
>>>>> VM".
>>>>> Can you try to set just 1 vCPU to your VM? In my case, VM with 1 vCPU
>>>>> was fast, almost no overhead, 2 v CPUs slightly slower but 4 or more
>>>>> was
>>>>> slow as hell.
>>>>> I would also recommend not to overprovision real CPU core count to
>>>>> vCPU
>>>>> and not use multi/hyper threading cores as real cores. With your CPU,
>>>>> use only 4 cores to assign to all your VMs (4 VMs with 1 vCPU each, o=
r
>>>>> 2
>>>>> VMs with 2 vCPU each, 1 VM with 4 vCPU)
>>>>>
>>>>> Miroslav Lachman
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Mario.
>>>>
>>> --
>>> Nikita Olenets
>>>
>>>
>>
>> --
>> Mario.
>>
> --
> Nikita Olenets
>
>

--=20
Mario.

--000000000000860cb005f76c0cec
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Yeah,that&#39;s another project that I will work on soon. =
So speak please. I use bhyve every day. <br></div><br><div class=3D"gmail_q=
uote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Mar 21, 2023 at 6:00=E2=
=80=AFPM Nikita Olenets &lt;<a href=3D"mailto:zeon@zeon.kiev.ua" target=3D"=
_blank">zeon@zeon.kiev.ua</a>&gt; wrote:<br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,20=
4,204);padding-left:1ex"><div dir=3D"auto">Hey Mario,</div><div dir=3D"auto=
"><br></div><div dir=3D"auto">Yeah, sorry. I was thinking that you were the=
 topic starter and you were trying to make things work under bhyve.</div><d=
iv dir=3D"auto"><br></div><div dir=3D"auto">Have a goo day.</div><div dir=
=3D"auto"><br></div><div dir=3D"auto">=E2=80=94 Nikita</div><div><br><div c=
lass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Mar 21, =
2023 at 12:54 Mario Marietto &lt;<a href=3D"mailto:marietto2008@gmail.com" =
target=3D"_blank">marietto2008@gmail.com</a>&gt; wrote:<br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s=
olid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Are you talking wi=
th me ? I can install Home Assistant only on the hardware that I already ha=
ve. Actually the best piece of hardware that I can use for my project (inst=
alling the chat gpt module on Home Assistant + a speech recognition softwar=
e to give a voice to chat gpt) is the nvidia jetson nano. And If I remember=
 correctly,it supports only Ubuntu. I can do the same on my Workstation,but=
 I prefer to have the ability to move the smaller nano within a plastic con=
tainer. At the end of the day It will be almost the same as a vocal assista=
nt,but uch more programmable. <br></div><br><div class=3D"gmail_quote"><div=
 dir=3D"ltr" class=3D"gmail_attr">On Tue, Mar 21, 2023 at 5:41=E2=80=AFPM N=
ikita Olenets &lt;<a href=3D"mailto:zeon@zeon.kiev.ua" target=3D"_blank">ze=
on@zeon.kiev.ua</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pad=
ding-left:1ex"><div dir=3D"auto">Hi,</div><div dir=3D"auto"><br></div><div =
dir=3D"auto">Is there any specific reason you want it to be installed under=
 Ubuntu?</div><div dir=3D"auto">I=E2=80=99m asking this because I use HasOS=
(home assistant OS) which is based on Linux (can=E2=80=99t recall the distr=
ibution) and I=E2=80=99m running this for three=C2=A0years now. No issues a=
t all. I do have even passed through ZigBee usb stick and it works just fin=
e.</div><div dir=3D"auto"><br></div><div><div class=3D"gmail_quote"><div di=
r=3D"ltr" class=3D"gmail_attr">On Mon, Mar 20, 2023 at 11:12 Mario Marietto=
 &lt;<a href=3D"mailto:marietto2008@gmail.com" target=3D"_blank">marietto20=
08@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin=
g-left:1ex"><div dir=3D"ltr"><div>Hello Julie.</div><div><br></div><div>As =
I said some days ago,I&#39;m trying to install homeassistant. For the momen=
t I&#39;m using Ubuntu 20.04 that I have installed on the Jetson nano,but l=
ater I will use Ubuntu within bhyve on FreeBSD. Unfortunately,a developer,I=
 suppose,told me that homeassistant is not supported on ubuntu. In Fact I t=
ried to do that following this tutorial :</div><div><br></div><div><a href=
=3D"https://vikoky.medium.com/jetson-nano-powered-house-29ce73f11de4" targe=
t=3D"_blank">https://vikoky.medium.com/jetson-nano-powered-house-29ce73f11d=
e4</a></div><div><br></div><div>but I&#39;ve got a lot of errors. I&#39;ve =
started a thread on reddit,asking for help,here :</div><div><br></div><div>=
<a href=3D"https://www.reddit.com/r/homeassistant/comments/11wglx7/homeassi=
sant_cant_be_installed_on_ubuntu_2004_the/" target=3D"_blank">https://www.r=
eddit.com/r/homeassistant/comments/11wglx7/homeassisant_cant_be_installed_o=
n_ubuntu_2004_the/</a></div><div><br></div><div>and he/she told me that ubu=
ntu is not supported. So,which linux distribution have you used within bhyv=
e ? thanks.<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Sun, Mar 19, 2023 at 7:12=E2=80=AFPM Miroslav Lachm=
an &lt;<a href=3D"mailto:000.fbsd@quip.cz" target=3D"_blank">000.fbsd@quip.=
cz</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex=
">On 18/03/2023 14:59, Julie Koubov=C3=A1 wrote:<br>
&gt; Hey everyone,<br>
&gt; <br>
&gt; I&#39;m running Linux (Home Assistant OS) in Bhyve on FreeBSD 13.1. I =
use <br>
&gt; PCI passthrough to allow the VM to=C2=A0access a USB card with a coupl=
e of <br>
&gt; radio dongles. The host machine is an Intel Core i3 13100 with 64 GB o=
f <br>
&gt; RAM. The CPU has 4 physical cores (8 hyper-threaded). The virtual <br>
&gt; machine is assigned four cores.<br>
&gt; <br>
&gt; The host load averages are 0.39 0.39 0.40 right now, which seems way t=
oo <br>
&gt; much. The same workload was previously handled by a Raspberry Pi 4, an=
d <br>
&gt; the CPU usage there was under 10% when not doing anything special. <br=
>
&gt; Inside the guest OS, the CPU usage is reported around 5%, which seems =
<br>
&gt; reasonable.<br>
&gt; <br>
&gt; What&#39;s wrong? How can I start debugging this issue? I use ZFS on t=
he <br>
&gt; host, vm-bhyve to manage the virtual machines, and I don&#39;t have a =
swap <br>
&gt; partition.<br>
<br>
I had similar problem few years ago. Never solved. Exhibited on bhyve <br>
and VirtualBox too. The problem was &quot;the more vCPU for VM, the slower =
VM&quot;.<br>
Can you try to set just 1 vCPU to your VM? In my case, VM with 1 vCPU <br>
was fast, almost no overhead, 2 v CPUs slightly slower but 4 or more was <b=
r>
slow as hell.<br>
I would also recommend not to overprovision real CPU core count to vCPU <br=
>
and not use multi/hyper threading cores as real cores. With your CPU, <br>
use only 4 cores to assign to all your VMs (4 VMs with 1 vCPU each, or 2 <b=
r>
VMs with 2 vCPU each, 1 VM with 4 vCPU)<br>
<br>
Miroslav Lachman<br>
<br>
<br>
</blockquote></div><br clear=3D"all"><br><span>-- </span><br><div dir=3D"lt=
r">Mario.<br></div>
</blockquote></div></div>-- <br><div dir=3D"ltr"><div dir=3D"ltr"><div>Niki=
ta Olenets<br><br></div></div></div>
</blockquote></div><br clear=3D"all"><br><span>-- </span><br><div dir=3D"lt=
r">Mario.<br></div>
</blockquote></div></div>-- <br><div dir=3D"ltr"><div dir=3D"ltr"><div>Niki=
ta Olenets<br><br></div></div></div>
</blockquote></div><br clear=3D"all"><br><span>-- </span><br><div dir=3D"lt=
r">Mario.<br></div>

--000000000000860cb005f76c0cec--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSigdN1wpjgi4xJyspjBsJnmUxUzswtwr6Df=8JE9U4jiPw>