Date: Mon, 20 Mar 2023 16:11:55 +0100 From: Mario Marietto <marietto2008@gmail.com> To: Miroslav Lachman <000.fbsd@quip.cz> Cc: =?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: <CA%2B1FSihrMf77N1Ec1wyndmvmJg5g6Ya9KJjKm9XcsM6o7R5V0g@mail.gmail.com> In-Reply-To: <343e827b-a1dc-b69b-9dcc-c6675deac070@quip.cz> References: <CABQ-j0ZH-OrZSb866iVMba-ZfxOsovGoyLd=YZ=auOiNtm-TkA@mail.gmail.com> <CABQ-j0bbTQWhM1wgYvDvvwpxQexqgtYDgN4vj8pYp2Ttu_WHHg@mail.gmail.com> <343e827b-a1dc-b69b-9dcc-c6675deac070@quip.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000037af0605f7565bd6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 ubuntu. 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_cant_b= e_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@quip.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 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 to= o > > 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 the > > 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, or 2 > VMs with 2 vCPU each, 1 VM with 4 vCPU) > > Miroslav Lachman > > > --=20 Mario. --00000000000037af0605f7565bd6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hello Julie.</div><div><br></div><div>As I said some = days ago,I'm trying to install homeassistant. For the moment I'm us= ing 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,tol= d me that homeassistant is not supported on ubuntu. In Fact I tried to do t= hat following this tutorial :</div><div><br></div><div><a href=3D"https://v= ikoky.medium.com/jetson-nano-powered-house-29ce73f11de4" target=3D"_blank">= https://vikoky.medium.com/jetson-nano-powered-house-29ce73f11de4</a></div><= div><br></div><div>but I've got a lot of errors. I've started a thr= ead on reddit,asking for help,here :</div><div><br></div><div><a href=3D"ht= tps://www.reddit.com/r/homeassistant/comments/11wglx7/homeassisant_cant_be_= installed_on_ubuntu_2004_the/" target=3D"_blank">https://www.reddit.com/r/h= omeassistant/comments/11wglx7/homeassisant_cant_be_installed_on_ubuntu_2004= _the/</a></div><div><br></div><div>and he/she told me that ubuntu is not su= pported. So,which linux distribution have you used within bhyve ? thanks.<b= r></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmai= l_attr">On Sun, Mar 19, 2023 at 7:12=E2=80=AFPM Miroslav Lachman <<a hre= f=3D"mailto:000.fbsd@quip.cz" target=3D"_blank">000.fbsd@quip.cz</a>> wr= ote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px= 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 18/03/20= 23 14:59, Julie Koubov=C3=A1 wrote:<br> > Hey everyone,<br> > <br> > I'm running Linux (Home Assistant OS) in Bhyve on FreeBSD 13.1. I = use <br> > PCI passthrough to allow the VM to=C2=A0access a USB card with a coupl= e of <br> > radio dongles. The host machine is an Intel Core i3 13100 with 64 GB o= f <br> > RAM. The CPU has 4 physical cores (8 hyper-threaded). The virtual <br> > machine is assigned four cores.<br> > <br> > The host load averages are 0.39 0.39 0.40 right now, which seems way t= oo <br> > much. The same workload was previously handled by a Raspberry Pi 4, an= d <br> > the CPU usage there was under 10% when not doing anything special. <br= > > Inside the guest OS, the CPU usage is reported around 5%, which seems = <br> > reasonable.<br> > <br> > What's wrong? How can I start debugging this issue? I use ZFS on t= he <br> > host, vm-bhyve to manage the virtual machines, and I don't have a = swap <br> > partition.<br> <br> I had similar problem few years ago. Never solved. Exhibited on bhyve <br> and VirtualBox too. The problem was "the more vCPU for VM, the slower = VM".<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> --00000000000037af0605f7565bd6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSihrMf77N1Ec1wyndmvmJg5g6Ya9KJjKm9XcsM6o7R5V0g>