networking - Suspected network performance issue on VirtualBox Ubuntu guest on Win7 host
2013-09
I have narrowed down a performance problem in my Ubuntu guest on a Win7 VirtualBox host to the network, after comparing and equalising everything else to do with my slow-running Java app with a colleague who runs the same app under Win7.
I set up Ubuntu 12.04 in VirtualBox on the Win7 machine I was allocated on my new project. I am running Java, Eclipse, Tomcat to develop a large data-intensive application and this app literally runs at half the speed of my colleague's identical machine.
Is there a ping test I can do or some other network diagnostic test to flag up any problems? I will accept any answer that will just get me moving forward - I don't expect anyone to come up with a blinding solution for the issue.
To give some background, the network performance is confusing.
Running a network speed test to my colleague's machine with iperf shows speeds of 6 Mb/s from my Ubuntu guest, and 90 Mb/s from the win7 host.
Large downloads, e.g. the Java SDK, come down at about 1.2 MB/s on both the guest and the host.
Pings are sub-1ms on the host, but 1.5ms on the guest.
I also did a broadband speed test, and got 10Mb/s download speed on both, but the host has an upload speed of 10Mb/s but the guest only uploads at 3Mb/s.
I've been trying to diagnose any MTU problems with ping -M do to identify any kind of packet fragmentation problem but it's progressing very slow because I don't have much experience in this area.
From what I read on other people's networking issues with VB and Linux guests on Win7 hosts, I should be able to get the speed on the guest up to the same level as the host.
I installed a fresh VM with Ubuntu again to see if I'd foobar'd it somehow, but I'm getting the same readings with iperf on the virgin installation.
My setup is:
Adapter 1: Intel PRO/1000 MT Desktop (NAT)
Adapter 2: ditto (host-only adapter)
eth0 Link encap:Ethernet HWaddr 08:00:27:0b:76:bf
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe0b:76bf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:86236 errors:0 dropped:0 overruns:0 frame:0
TX packets:49369 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:69163946 (69.1 MB) TX bytes:3530535 (3.5 MB)
eth2 Link encap:Ethernet HWaddr 08:00:27:a3:26:b8
inet addr:192.168.56.101 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fea3:26b8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:59 errors:0 dropped:0 overruns:0 frame:0
TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9148 (9.1 KB) TX bytes:7648 (7.6 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:701 errors:0 dropped:0 overruns:0 frame:0
TX packets:701 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:66321 (66.3 KB) TX bytes:66321 (66.3 KB)
I like to know how to use command-line to connect to a wired network in general for Ubuntu 8.10?
In my case, I connect a cable to my laptop but it doesn't work with my WICD. So I like to try command-line method.
Here is the ifconfig of my network adapters:
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:c0:9f:8d:23:74
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19 Base address:0x1800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4457 errors:0 dropped:0 overruns:0 frame:0
TX packets:4457 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:493002 (493.0 KB) TX bytes:493002 (493.0 KB)
wlan0 Link encap:Ethernet HWaddr 00:0e:9b:ab:56:19
UP BROADCAST NOTRAILERS PROMISC ALLMULTI MTU:576 Metric:1
RX packets:1508929 errors:0 dropped:0 overruns:0 frame:0
TX packets:768144 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:806027375 (806.0 MB) TX bytes:78834873 (78.8 MB)
wlan0:avahi Link encap:Ethernet HWaddr 00:0e:9b:ab:56:19
inet addr:169.254.5.92 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST NOTRAILERS PROMISC ALLMULTI MTU:576 Metric:1
wmaster0 Link encap:UNSPEC HWaddr 00-0E-9B-AB-56-19-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
UPDATE:
Tried what oyvindio suggested. Here is the failing message:
$ sudo dhclient3 eth0
There is already a pid file /var/run/dhclient.pid with pid 18279
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
mon0: unknown hardware address type 803
wmaster0: unknown hardware address type 801
mon0: unknown hardware address type 803
wmaster0: unknown hardware address type 801
Listening on LPF/eth0/00:c0:9f:8d:23:74
Sending on LPF/eth0/00:c0:9f:8d:23:74
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
If your router is set up to serve IP addresses via dhcp, run sudo dhclient3 eth0
to ask for an IP address for the eth0
interface.
The No DHCPOFFERS received.
means that you're not reaching, and getting a response, from the DHCP server.
There may be a number of reasons for this, but having your wireless in monitor mode isn't one I'd put on the list. It could be that the DHCP server only serves a limited set of MAC addresses (each network card has a unique MAC address), or that there is no DHCP server. It could also be a security feature of the switch restricting access only to certain MAC addresses.
The other thing to check is hardware - does the network cable work with another computer and does your computer work with another wired network.
The easy way to test your theory is to take wlan0
out of monitor mode.