poor network performance when using virtio together with NAT

Discussions related to using VirtualBox on Linux hosts.
Post Reply
freejack
Posts: 5
Joined: 6. Jun 2012, 20:00
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 32, Ubuntu 14.04 64, W2k, XP32, Win7 64
Location: Germany, Black Forest

poor network performance when using virtio together with NAT

Post by freejack »

Using VirtualBox 5.0.12 r104815 with Ubuntu 14.04 64 bit as host system I set up a guest (also Ubuntu 14.04 64 bit) without guest additions. The guest is used as headless server. I am experiencing a very poor network performance when using a virtio adapter together with NAT. I performed several tests using other combinations of bridged networking and Intel PRO/1000 MT Server NIC. Only NAT combined with virtio performs poor:
  • * virtio, bridged: 75 MB/s
    * virtio, NAT: 1.5 MB/s
    * Intel PRO/1000 MT Server, bridged: 10 MB/s
    * Intel PRO/1000 MT Server, NAT: 8 MB/s
The bandwidth figures are measured downloading a one GB test file from the guest to the host via wget on the host and apache httpd on the guest. I would have expected virtio+NAT performing at least equal or slightly better than an emulated hardware NIC+NAT. As bridged virtio performes perfectly fine I am currently not supecting the virtio driver in the guest to be the cause of the issue.
Attachments
cserver-2015-12-28-15-06-33.log
log from virtio+NAT session
(67.47 KiB) Downloaded 7 times
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: poor network performance when using virtio together with

Post by Martin »

Your guest VM is too "big" to run performant:

Host RAM: 11999MB total, 10740MB available
RamSize <integer> = 0x0000000200000000 (8 589 934 592, 8 GB)
You shold leave some more free RAM available for the host

CPUM: Physical host cores: 6
NumCPUs <integer> = 0x0000000000000006 (6)
You should not assign all physical CPU cores to a guest VM, the host needs a core for itself to run your VM effectively.

Are the performance numbers different when you configure your guest to 4 vCPU and 4-6GB RAM?
freejack
Posts: 5
Joined: 6. Jun 2012, 20:00
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 32, Ubuntu 14.04 64, W2k, XP32, Win7 64
Location: Germany, Black Forest

Re: poor network performance when using virtio together with

Post by freejack »

Thanks for the hint. But using 4 of 6 cores and 4 of 12 GB RAM for the guest did not improved the virtio+NAT bandwidth. I assume there might be an issue which is specific to this combination -- all other network settings work far better.
Attachments
cserver-2015-12-28-16-02-22.log
(108.48 KiB) Downloaded 8 times
Post Reply