Need network help (VB 5.1.28 really slow)

Discussions about using Linux guests in VirtualBox.
keywild
Posts: 22
Joined: 13. Oct 2017, 16:58

Need network help (VB 5.1.28 really slow)

Post by keywild »

I have been using vmware for nearly two decades but their support for Linux is somewhat lacking. I am looking for alternatives. I decide to try Oracle VirualBox running on top of Linux. So far I have been fairly impressed except for one wee little nit picking problem. The guest LAN access is REALLY, REALLY, slow.

Operating System (guest and host):
Clean installs of Linux Mint 18.2 with Mate desktop environment.

Hardware:

I have actually done this on two machines but right now I am working with:
Desktop:HP 8330 SFF
CPU: Intel i7-3770 CPU @ 3.40GHz
Ram: 32 GBytes
Display adapter: Nvidia NVS 310
Sata SSD: 250 Gbytes, INTEL SSDSA2BW120G3H (4PC10365)
Lan Adapter: Intel Pro E1000 (mother board)

Software:
virtualbox-5.1_5.1.28-117968-Ubuntu-xenial_amd64
Oracle_VM_VirtualBox_Extension_Pack-5.1.28-117968
VBoxGuestAdditions_5.1.28.iso

The Problem:
Host LAN performance runs anywhere from 35 MB to 50 MB/sec copying file across a 1000 base T LAN with netgear switches.
Guest LAN performance runs anywhere from 750 kB to 1 MB/sec copying file across the same LAN and adapter.
Source files are on another desktop computer running the same OS and using SMB sharing.
It is interesting that guest access to the Internet does not seem to be thus encumbered.
Guest is configured for 'bridged networking' because I NEED access to the LAN IP space.
Guest is configured with 4 CPUs and 4 Gbytes of ram.

I tried changing from virt-io nic to E000 nic. That is about 10% better

I tried changing chip-set from PII3 to ICH9
That slowed it down by about 25%

I changed the emulation type from KVM to Hyoer-V
lost all audio ... no significant difference in network

I changed the emulation type to legacy. That is actually 10% faster

Increased RAM to 8 GBytes

.... Now what ????
Configuration.zip
(8.66 KiB) Downloaded 12 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need network help (VB 5.1.28 really slow)

Post by Perryg »

Post the guests log file ( as an attachment ). Right click on the guest in the Main Manager then click show log. Save and post as an attachment. Compress if it is too large to post.
keywild
Posts: 22
Joined: 13. Oct 2017, 16:58

Re: Need network help (VB 5.1.28 really slow)

Post by keywild »

guest logs attached
guest-logs.zip
(109.23 KiB) Downloaded 16 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need network help (VB 5.1.28 really slow)

Post by Perryg »

I would suggest setting the cpu core count to no more than 2 as your host only has 4.

As for the configuration and logs, I don't see a real reason why the local lan would be so much slower that the Internet. You could try setting the guest to use jumbo frames and see if that helps or use something like wireshark to see if you can find what is causing the bottleneck and iperf between the guest and where ever you are receiving the data to see if it is truly the lan that is causing the slow down. I do know that the guests net speed is always going to be slower than the host but I usually see at least 50MB when moving files on my lan and GB when doing host to guest transfers.
keywild
Posts: 22
Joined: 13. Oct 2017, 16:58

Re: Need network help (VB 5.1.28 really slow)

Post by keywild »

So I did try setting it to 2 CPUs and that made no difference.
Actually it is four cores with two threads each.
I am going to reformat the hard disk and try a previous version of vbox to see if this is consistent
If it is then I guess I will move on the Qemu/Kvm
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need network help (VB 5.1.28 really slow)

Post by Perryg »

If it is always linux on linux you can not do better than kvm. But I really wish you would test the net as I suggested. There are a lot more things that can cause this and I know for sure that higher throughput is possible as I see it myself.
keywild
Posts: 22
Joined: 13. Oct 2017, 16:58

Re: Need network help (VB 5.1.28 really slow)

Post by keywild »

Well it has been at least a decade since I have had need to use a network sniffer and I had corporate resources then. Now it is just little on me (retired) :D

It would be somewhat of a learning curve when I already have too many projects on the back burner ... I am retired I am not supposed to be that busy :cry:

I looked up wireshark and noticed it requires Windows or OS-X so that is a non-starter. Looks like iperf is more OS friendly but at the moment I am in the middle of trying an older version vbox (well actually reinstalling the OS at this point - because someone neglected to clone the clean install).
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need network help (VB 5.1.28 really slow)

Post by Perryg »

Wireshark is native to Linux so it is available in your package manager, apt, or apt-get. iperf is easy as well. You install it on the guest and also on a linux host be it the actual host or another in the lan. It is command line but easy to run
iperf -s starts the server, then on the guest you run iperf -c and the ip address of the server ( example iperf -c 192.168.1.22 ) then it runs and you see what it has to say.

But you do what makes you comfortable. I retired years ago and to tell you the truth I have never worked harder than I do now. Everyone that missed me is now paying for my consulting. so I guess they should have offered more to begin with hahaha
keywild
Posts: 22
Joined: 13. Oct 2017, 16:58

Re: Need network help (VB 5.1.28 really slow)

Post by keywild »

Host: Linux Mint 17.3 Host
Hypervisor: Oracle Virtualbox version 4.3.4
Guest: Linux Mint 17.3 Host
(same hardware)
Host LAN Throughput: 10 MB/sec
Guest LAN Throughput: 10 MB/sec

So the 64 Thousand Dollar question is: Who broke what in which upgrade?
Obviously the the LAN performance for the host is improved in the later version of the OS but .....

So I booted Linux Mint 18.2 in a new guest machine: Guest LAN Throughput: 10 MB/sec
Thus I do not believe the client OS is the problem
keywild
Posts: 22
Joined: 13. Oct 2017, 16:58

Re: Need network help (VB 5.1.28 really slow)

Post by keywild »

Virtual box 4.3 will not install on Linux Mint 18.2 .... and a reboot
However there is a procedure (long, tedious and painful) to upgrade in place Mint 17.3 to Mint 18.0
After that upgrade :
Host LAN Performance: 58 MB/sec
Guest 17.3 LAN Performance: 40 MB/sec
Guest 18.2 LAN Performance: 30 MB/sec

Then I did a kernel upgrade on the host from 4.0.0-21 to 4.0.0-97
no change ...

Next I did an in place upgrade from mint 18.0 to 18.2 (and a cold reboot just for practice)
Host LAN Performance: 56 MB/sec
Guest 17.3 LAN Performance: 36 MB/sec
Guest 18.2 LAN Performance: 40 MB/sec

Then I did a kernel upgrade on the host from 4.0.0-97 to 4.8.0-53
Host LAN Performance: 60 MB/sec
Guest 17.3 LAN Performance: 36 MB/sec
Guest 18.2 LAN Performance: 42 MB/sec

That brings the OS current with the highest LAN Performance but it is far from what I would call a "clean install".
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need network help (VB 5.1.28 really slow)

Post by Perryg »

So the 64 Thousand Dollar question is: Who broke what in which upgrade?
There is a constant battle going on just trying to keep up with the kernel upgrades for VirtualBox and other packages/programs that rely on consistence to be able to achieve maximum performance. Normally it is not all that noticeable but there are times...

I usually build my own kernel and while I do upgrade on occasion to at least try to keep up-to-date with the real world, I don't do it just to keep up with the Jones so to speak. Only when I see a need that comes across in my daily work. I also know that both the kernel guys and VirtualBox have been working on the network stack and other areas that effect performance so whom to place the actual blame on is anyone’s guess. Like I said I usually have a vastly higher throughput than most so if I were going to make a bet it would be the kernel that is causing the change. I also know that most if not all OS distros in their attempt to make everything easy and PnP-able use settings that they consider safe for all. This usually works but almost never optimally.
keywild
Posts: 22
Joined: 13. Oct 2017, 16:58

Re: Need network help (VB 5.1.28 really slow)

Post by keywild »

Well silly me decided to see if I could upgrade Vbox on top of the previous convoluted install ... but I did a good back up of same before I attempted that. What was interesting is that when I went to Synaptic Package Manger it told me that vbox 4.3 was installed and offered not other options. Well I am stubborn so I tried to install the deb file for 5.1.28 but it complained of conflicts with the installed software. Still a gluten for punishment I tried apt-get and then ....

Well to make a long story short the real world answer that does work. For anyone silly enough to want more details see the attached.
vbox upgrade 4.3.40 to 5.1.28 notes.txt.zip
(2.59 KiB) Downloaded 11 times
OK ... try something else. Restore a clean OS image, install vbox 5.1.28 and then try to run the virtual machines created in ver 4.3. Tried that and no joy. It objected to Ethernet adapter and offered to replace it (and did so as a courtesy without my approval). That brings us back full circle to the same dismal network performance. Thus I decided to compare the two XML files:
NEW XLML FILE:

Code: Select all

<Network>
        <Adapter slot="0" enabled="true" MACAddress="0800274B27FD" cable="true" type="82540EM">
          <DisabledModes>
            <InternalNetwork name="intnet"/>
            <NATNetwork name="NatNetwork"/>
          </DisabledModes>
          <BridgedInterface name="eno1"/>
        </Adapter>
        <Adapter slot="1" MACAddress="080027689B3C" cable="true" type="82540EM"/>
        <Adapter slot="2" MACAddress="08002709A41D" cable="true" type="82540EM"/>
        <Adapter slot="3" MACAddress="0800275D5C1C" cable="true" type="82540EM"/>
        <Adapter slot="4" MACAddress="080027ED77FC" cable="true" type="82540EM"/>
        <Adapter slot="5" MACAddress="0800276F62FA" cable="true" type="82540EM"/>
        <Adapter slot="6" MACAddress="080027BDEFA3" cable="true" type="82540EM"/>
        <Adapter slot="7" MACAddress="0800276B0F1A" cable="true" type="82540EM"/>
      </Network>
OLD XML FILE

Code: Select all

<Network>
        <Adapter slot="0" enabled="true" MACAddress="0800274B27FD" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
            <InternalNetwork name="intnet"/>
            <NATNetwork name="NatNetwork"/>
          </DisabledModes>
          <BridgedInterface name="eth0"/>
        </Adapter>
        <Adapter slot="1" enabled="false" MACAddress="080027689B3C" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="2" enabled="false" MACAddress="08002709A41D" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="3" enabled="false" MACAddress="0800275D5C1C" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="4" enabled="false" MACAddress="080027ED77FC" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="5" enabled="false" MACAddress="0800276F62FA" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="6" enabled="false" MACAddress="080027BDEFA3" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="7" enabled="false" MACAddress="0800276B0F1A" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
      </Network>
The BIG difference I saw here was that in the new file "Adapter slots" were set to enabled="true" .
So I changed them false and tried again .... no joy.

So lets try a different NIC: PCnet-FAST III (AM79c973). NYET! That cut the speed in half.

One last try. I am going to try a different Linux distribution as the base OS. The problem is I really abhor the Microsoft Windows Desktop style that Ubuntu and others have adopted. Oh --- I will have to re-cable the HP desktop so I can see the boot prompt on a VGA monitor. Maybe debian ....
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need network help (VB 5.1.28 really slow)

Post by Perryg »

Mint will work, but from your explanation I may have figured out the issue you are having. There are two different distributions of VirtualBox. The one the repo offers and the one that VirtualBox offers and these can not be mixed. In other words you can not "ever" try to upgrade the distro version with the one from VirtualBox as they will conflict. This can be fixed by purging all virtualbox packages from the OS and then install the right one, but not with the package manager. These just don't work out right. They usually try to make you use the repo version and here goes the wicked loop all over again. Instead of using any package manager use the command line and dpkg. Even if you don't see/know that is what the package manager uses anyway so cut out the offending body ( package manager ) and do it yourself.

Example:
sudo dpkg -i <the package you want to install>

Oh and the only adapter type you should use is virt-io (my preference) or the intel. The rest will not work properly for any of the newer OSes
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Need network help (VB 5.1.28 really slow)

Post by Perryg »

One last thing. Debian is a great OS but not for the faint of heart. It is not as user friendly for new users or ones that don't want to get their hands dirty with the command line.
keywild
Posts: 22
Joined: 13. Oct 2017, 16:58

Re: Need network help (VB 5.1.28 really slow)

Post by keywild »

As a matter of fact I have tried both. If one wants version 5.1.28 you MUST do a manual install because the package manager installs version 5.0.40. Oh and I always install on clean OS installation when testing (too many variables otherwise). One thing I am getting very good at is making partition copies :(

Any base OS recommendations ???
Post Reply