[Solved] All of my VMs have slow internet speeds.

Discussions about using Linux guests in VirtualBox.
Post Reply
AmericanSyrup
Posts: 6
Joined: 23. Aug 2022, 05:17

[Solved] All of my VMs have slow internet speeds.

Post by AmericanSyrup »

I am on a wired NAT connection. My Host OS is Windows 11, my guest OS is Linux Mint 20.1 (its the ova the school provided for us to work with). On my host, i get 900-950mb upload and around 850-950mb download speeds. On my Linux guest OS, I'm getting 60-70mb down and 80mb up.

Code: Select all

sudo lshw -C network
  *-network                 
       description: Ethernet interface
       product: 82540EM Gigabit Ethernet Controller
       vendor: Intel Corporation
       physical id: 3
       bus info: pci@0000:00:03.0
       logical name: enp0s3
       version: 02
       serial: 08:00:27:66:61:f1
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 66MHz
       capabilities: pm pcix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full ip=192.168.1.124 latency=64 link=yes mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:19 memory:f0200000-f021ffff ioport:d020(size=8)

Code: Select all

sudo ethtool enp0s3
Settings for enp0s3:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	MDI-X: off (auto)
	Supports Wake-on: umbg
	Wake-on: d
	Current message level: 0x00000007 (7)
			       drv probe link
	Link detected: yes
I've been wracking my brain all night as to why my Host OS gets literally 10x faster Ethernet speeds. I've tested on a Mint, Kali, and Ubuntu VM. NAT and Bridged connection. Everything is showing I should get 1000mb speeds but it's just not there as far as I can see. I have 4GB of RAM and 4 cores on each VM. Any other information I can give you to help me out, I will gladly provide.I'm new to VMs so it's just me and google right now.
AmericanSyrup
Posts: 6
Joined: 23. Aug 2022, 05:17

Re: All of my VMs have slow internet speeds.

Post by AmericanSyrup »

Some things that didn't occur to me last night. My Host is on Windows 11. And i didn't enable virtualization in the bios. Its a Lenovo ThinkPad laptop. I mention these because i installed virtualbox on my pc and ran the exact same VM on it and i was getting 10-15x better network speeds. After work i'll try enabling virtualization, then completely fresh installing VirtualBox, and if all else fails, swapping down to windows 10 OS.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: All of my VMs have slow internet speeds.

Post by mpack »

AmericanSyrup wrote:Some things that didn't occur to me last night. My Host is on Windows 11. And i didn't enable virtualization in the bios.
You really ought to attach a zipped VM log if you want answers.

Modern PCs typically have the BIOS feature enabled by default, so that won't be it.

Best guess is that you have Hyper-v enabled, which makes everything in the VM slow, not just the network.
HMR3Init: Attempting fall back to NEM (Hyper-V is active)
AmericanSyrup
Posts: 6
Joined: 23. Aug 2022, 05:17

Re: All of my VMs have slow internet speeds.

Post by AmericanSyrup »

mpack wrote: You really ought to attach a zipped VM log if you want answers.

Modern PCs typically have the BIOS feature enabled by default, so that won't be it.

Best guess is that you have Hyper-v enabled, which makes everything in the VM slow, not just the network.
HMR3Init: Attempting fall back to NEM (Hyper-V is active)
Ok. I'll look that up how to get the vm logs and do that on my lunch break today. I thought disabled Hyper-v by unchecking it and the windows sandbox thing because I saw someone mention that, but I do still have the turtle icon (which I think I read means its using Hyper-v. So I probably missed something. VIrtualization was on by default so you were right about that. The link you posted had some extra steps I hadn't seen anywhere so I'll do those too.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: All of my VMs have slow internet speeds.

Post by mpack »

If you have the turtle then Hyper-v is enabled, and it also confirms that you don't need to think about the BIOS: VT-x/AMD-v is enabled or Hyper-v wouldn't be running.
AmericanSyrup
Posts: 6
Joined: 23. Aug 2022, 05:17

Re: All of my VMs have slow internet speeds.

Post by AmericanSyrup »

mpack wrote:If you have the turtle then Hyper-v is enabled, and it also confirms that you don't need to think about the BIOS: VT-x/AMD-v is enabled or Hyper-v wouldn't be running.
I followed that guide to the t and the turtle disappeared and I have the V now, which is good. I'm definitely getting much better performance now.I'm not sure what VMs normally run at but I'm at 90mbps up and down compared to my 800 on the laptop, which I thought looked slow but it feels really snappy and responsive so I'm not mad about it. I know there's always going to be reduced performance. Here's a copy of the logs just in case i messed something else up. Thanks so much for your help. I never even thought that I might not have fully disabled Hyper-v. I'm loving getting into virtualization and messing around with the VMs so I just want to say thanks for taking the time to help me with this!
Attachments
8-24-22VMLog.zip
(33.85 KiB) Downloaded 158 times
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: All of my VMs have slow internet speeds.

Post by Martin »

Are you sure it is 90 Mb/s and not 90 MB/s?
AmericanSyrup
Posts: 6
Joined: 23. Aug 2022, 05:17

Re: All of my VMs have slow internet speeds.

Post by AmericanSyrup »

Martin wrote:Are you sure it is 90 Mb/s and not 90 MB/s?
VMSpeedtest8-24.png
VMSpeedtest8-24.png (25.96 KiB) Viewed 25218 times
This is what shows when i go to google speedtest
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: All of my VMs have slow internet speeds.

Post by fth0 »

Why did you disable System > Acceleration > Nested Paging? This is known to slow down any VM considerably.

If that doesn't solve your problem, take a look at 9.8.3. Tuning TCP/IP Buffers for NAT.

PS: In one of my own setups, I have 800+ Mbps on the host and 500+ Mbps in the guest, without any tuning.
AmericanSyrup
Posts: 6
Joined: 23. Aug 2022, 05:17

Re: All of my VMs have slow internet speeds.

Post by AmericanSyrup »

fth0 wrote:Why did you disable System > Acceleration > Nested Paging? This is known to slow down any VM considerably.

If that doesn't solve your problem, take a look at 9.8.3. Tuning TCP/IP Buffers for NAT.

PS: In one of my own setups, I have 800+ Mbps on the host and 500+ Mbps in the guest, without any tuning.
I don't honestly remember. I probably saw it in a YouTube video or I was just trying things to see if anything helped. This has helped alot. Thank you so much. I'm at 600 up and down now....You have all been so great at walking me through this and not making me feel like an idiot.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: All of my VMs have slow internet speeds.

Post by fth0 »

You're welcome, and thanks for reporting back! :)
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: [Solved] All of my VMs have slow internet speeds.

Post by arQon »

I relink the latest one of these (this one, apparently) every couple of years when the topic comes up. :)
It's currently viewtopic.php?f=6&t=91229#p439502 AFAICT, but that's outdated, and things currently stand at 82,356,448.76 B/s for rsync, i.e. 659Mb/s as the link level.

This is on a machine much older and weaker than yours (drowning in "mitigations"; and using the cheapest GbE switch i could find, since it was meant to be temporary). So you have ~10% still missing somewhere, but could probably do quite a bit better than that if you really wanted. There are a few tips in the prev post on those pieces.
Post Reply