yaobin.wen

Yaobin's Blog

View on GitHub
16 January 2017

Configure `VirtualBox` Network Bandwidth

by yaobin.wen

I’m using VirtualBox 4.3.36 on my Ubuntu 14.04. Both the host and guest are Ubuntu 14.04. Today when I was copying some files in it from a remote computer, I noticed that the network bandwidth was just about 5 to 7 kilobytes per second.

I searched on the Internet and eventually got to one chapter of VirtualBox official documentation: Chapter 6. Virtual networking. This section provides some rules of thumb to tune the virtual machine’s network performance:

Here is the short summary of things to check in order to improve network performance:

  • Whenever possible use virtio network adapter, otherwise use one of Intel PRO/1000 adapters;

  • Use bridged attachment instead of NAT;

  • Make sure segmentation offloading is enabled in the guest OS. Usually it will be enabled by default. You can check and modify offloading settings using ethtool command in Linux guests.

The first two settings can be done in the virtual machine’s “Settings” -> “Network”. But first of all the virtual machine must be shut down.

The last thing can be done by following the steps below:

After all of these set, the virtual machine’s network bandwidth should be improved as expected.

Tags: Tech