# VirtualBox 4.0.X - Bridged - Slow performance



## Tomse (Aug 26, 2011)

Hi there.

Since I've upgraded VB to v4 I've had bad network performance on the guest, in the matter of loss of packages or other..

Host HW has

```
re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xe800-0xe8ff mem 0xfafff000-0xfaffffff,0xfaff8000-0xfaffbfff irq 17 at device 0.0 on pci2
```
as netcard, I've tried several different guest netcards

Pinging the guest OS (which is running freebsd too), no lines have been removed.

```
PING guest (guest) 56(84) bytes of data.
64 bytes from guest: icmp_req=1 ttl=64 time=7.02 ms
64 bytes from guest: icmp_req=2 ttl=64 time=1.16 ms
64 bytes from guest: icmp_req=3 ttl=64 time=1.38 ms
64 bytes from guest: icmp_req=4 ttl=64 time=0.700 ms
^C64 bytes from guest: icmp_req=5 ttl=64 time=1.56 ms

--- guest ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 20259ms
rtt min/avg/max/mdev = 0.700/2.367/7.025/2.347 ms
```

Pinging the host OS which is running FreeBSD 8.2 i386 VB 4.0.12 (previous 4.0.10 and 4.0.8)

```
PING VBHost (VBHost) 56(84) bytes of data.
64 bytes from VBHost: icmp_req=1 ttl=64 time=1.15 ms
64 bytes from VBHost: icmp_req=2 ttl=64 time=1.10 ms
64 bytes from VBHost: icmp_req=3 ttl=64 time=0.262 ms
64 bytes from VBHost: icmp_req=4 ttl=64 time=0.264 ms
64 bytes from VBHost: icmp_req=5 ttl=64 time=1.10 ms
64 bytes from VBHost: icmp_req=6 ttl=64 time=0.283 ms
64 bytes from VBHost: icmp_req=7 ttl=64 time=1.08 ms
64 bytes from VBHost: icmp_req=8 ttl=64 time=0.260 ms
64 bytes from VBHost: icmp_req=9 ttl=64 time=1.09 ms
64 bytes from VBHost: icmp_req=10 ttl=64 time=0.265 ms
64 bytes from VBHost: icmp_req=11 ttl=64 time=1.10 ms
64 bytes from VBHost: icmp_req=12 ttl=64 time=0.266 ms
64 bytes from VBHost: icmp_req=13 ttl=64 time=1.11 ms
64 bytes from VBHost: icmp_req=14 ttl=64 time=0.279 ms
^C
--- VBHost ping statistics ---
14 packets transmitted, 14 received, 0% packet loss, time 13003ms
rtt min/avg/max/mdev = 0.260/0.689/1.154/0.421 ms
```

as you can see more responses are received in lesser time

netcards (host/guest) are running gigabit, but 100Mbit gives no effect
Switch have been changed.

I get a lot of timeouts using the services of the guest, i.e. smtp.

anyone got any ideas ?

cheers
T


----------



## wblock@ (Aug 26, 2011)

It works okay here, less than one second pings from bridged VM to host or back the other way.  Guest is set to Intel PRO/1000 Desktop, host has a built-in Realtek 8111 that's about three years old.

If the operating system has been updated since the latest VirtualBox was installed, rebuild and reinstall emulators/virtualbox-ose-kmod


----------



## Tomse (Aug 28, 2011)

Thanks. 
But I just recently upgraded/compiled 4.0.12

Though I've updated the host system with freebsd-update

as I can see you've hinted I might need to compile kernel/world instead

I'll have a go at that, then recompile VB

Will also try with intel pro/1000 whan thats done.. I read somewhere in the forum to use one of the older generic netcards, I think it was AMD..

I'll post back when recompiling is done.


----------



## wblock@ (Aug 28, 2011)

Tomse said:
			
		

> Thanks.
> But I just recently upgraded/compiled 4.0.12
> 
> Though I've updated the host system with freebsd-update
> ...



I don't use freebsd-update, but I think it updates /usr/src also.  The VirtualBox kernel module is built based on that source, so rebuilding and reinstalling that port might be needed.  Rebuilding the operating system should not be necessary.



> Will also try with intel pro/1000 whan thats done.. I read somewhere in the forum to use one of the older generic netcards, I think it was AMD..



PXE only works with PCnet-PCI II (Am79C970A) (last time I tested, anyway).  AFAIR the Intel PRO/1000 is fine otherwise.


----------



## Tomse (Aug 29, 2011)

wblock said:
			
		

> I don't use freebsd-update, but I think it updates /usr/src also.  The VirtualBox kernel module is built based on that source, so rebuilding and reinstalling that port might be needed.  Rebuilding the operating system should not be necessary.



Unfortunately I think it is neccessary, as I haven't updated with freebsd-update after I compiled the VirtualBox.

We'll see how it goes after compiling/installing world/kernel


----------



## Tomse (Aug 31, 2011)

After compiling kernel (and world) it looks like I get a good flow of ping replies again.

so apparently my kernel source wasn't in sync with the installed kernel.

thanks alot 

I need to do some more testing from a computer not being the host before marking this thread as solved.

Cheers 
/T


----------



## Tomse (Sep 2, 2011)

testing with ping replies went fine, though I still get timeouts from services.

in regards to the pinging the thread can be marked as solved, but I'll leave it to the mods to decide that as the bad network performance is still existing.

@wblock thanks for the help, your answer did improve my system


----------

