Slow network on Macos X

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
salzrat
Posts: 4
Joined: 17. Dec 2022, 12:22

Slow network on Macos X

Post by salzrat »

I am running Homeassistant in a Virtualbox VM on a Macbook Air (Intel i5, 8GB RAM, Macos Big Sur 11.6.4), connected to my network with the thunderbird gbit ethernet adapter.

I have noticed that the network in the virtual machine is significantly slower than on the host.

When I transfer a file into a share on MacOS, I get a minimum of 600Mbit/s (and that could go even higher if I put the other machine on a LAN).
However, when I transfer a file into a samba share on Homeassistant, I get on average 180Mbit (osciallating between 150 and 200mbit).

This is problematic because I want to use the Homeassistant to do an hourly log of my internet speeds using ookla speedtest. So far this worked great because my plan was 150mbit, but I now switched to a 300mbit plan and that cannot be monitored anymore, I get the same capped speeds as with the file transfer.

I already tried both piix3 and ich9 southbridge emulation (as per another forum post). The guest is connected via a bridged network adapter using the paravirtualized (virtio) adapter.

Is there anything I can do to increase the network speed?

Thanks!
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Slow network on Macos X

Post by scottgus1 »

Everything in the VM's 'hardware' exists as bits and bytes going through the host CPU. If the host CPU or the VM's 'processors' are slogged down, the throughput of data won't be as good. Check host and VM CPU usage.

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. In the "Logs" subfolder, zip the VM's "vbox.log", and post the zip file, using the forum's Upload Attachment tab.
salzrat
Posts: 4
Joined: 17. Dec 2022, 12:22

Re: Slow network on Macos X

Post by salzrat »

Thanks.

I did as you said. Started the VM, copied a 3GB-file to the Samba-share, and shut it down again. Attached the vbox.log, as well as 2 screenshots. The first shows the transfer rate oscillation on the source machine (where I copy the file from). I assume it's slow in the beginning because homeassistant is still starting up. The dip in transfer speed is probably when I started activity monitor, so the VM got less resources while it was starting. Then it settles into this oscillation mode I already described. The second screenshot is the Activity monitor graph for the procedure. The copy indeed leeds to a higher CPU load, after the copy it drops down significantly. The spike in the beginning is certainly the startup.

So is the host not powerful enough? Or can something be done to make this more efficient?

Thanks!
Attachments
2022-12-17 22.03.55.png
2022-12-17 22.03.55.png (15.73 KiB) Viewed 1731 times
2022-12-17 22.02.44.png
2022-12-17 22.02.44.png (16.97 KiB) Viewed 1731 times
VBox.zip
(30.53 KiB) Downloaded 2 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Slow network on Macos X

Post by scottgus1 »

Guest CPU settings:
00:00:05.603216 NumCPUs <integer> = 0x0000000000000001 (1)
Try 2 VM processors.
salzrat
Posts: 4
Joined: 17. Dec 2022, 12:22

Re: Slow network on Macos X

Post by salzrat »

That brings speeds down to about 80-90Mbit/s.
Attachments
2022-12-18 13.32.54.png
2022-12-18 13.32.54.png (15.39 KiB) Viewed 1672 times
salzrat
Posts: 4
Joined: 17. Dec 2022, 12:22

Re: Slow network on Macos X

Post by salzrat »

Any other ideas?
Post Reply