Slow I/O or Network Performance on Vagrant Box

561 views
Skip to first unread message

Bruno Antunes

unread,
Dec 17, 2014, 6:13:09 AM12/17/14
to vagra...@googlegroups.com
Hi,

I have a VirtualBox box running Ubuntu 14.04 Server on a Host machine also running Ubuntu 14.04 Server.

I'm running a Sonatype Nexus service on the box and facing slow performance when uploading files to Nexus. The upload speed is very slow and unstable, ranging from ~100KB/s to ~10MB/s, while the upload of files to the host machine is fast, ~300MB/s. Although I was not expecting the same performance in the the two machines, I think the performance of the guest machine is much poor than expected.

I'm not using shared folders, all the data is stored on the box hard drive (VMDK).

Any idea on what may be causing this behaviour?

Thanks in advance.

Best regards,
Bruno

Alvaro Miranda Aguilera

unread,
Dec 17, 2014, 3:58:03 PM12/17/14
to vagra...@googlegroups.com
Have you tested with a dedicated IP on the guest, and uploading directly?

Try ftp rather than sftp/rsync since those are quite CPU intense and you may have a bottle neck there.

to have a better look where the permormance issue is happening, on both machines run:

iotop (as root)
iostat -mx 5
top

that will show you what process and what disk are the ones getting all the workload. 

Alvaro.



--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bruno Antunes

unread,
Dec 20, 2014, 6:57:05 AM12/20/14
to vagra...@googlegroups.com
Hi Alvaro,

I have changed the network setup to use a static IP:
config.vm.network "private_network", ip: "10.0.1.52"

With this configuration the IO performance have improved, I think it solved my problem.

But with this network setup I cannot access VM from other machines in my network, only from the host machine.
So I have tested this network setup:
config.vm.network "public_network", bridge: "br0", ip: "10.0.1.52", netmask: "255.0.0.0"

With this setup I can access the VM from other machines in my network but cannot access it from the host machine.
Is there a way to use a public IP and access the VM from both other machines and the host machine?

Thanks,
Bruno

Alvaro Miranda Aguilera

unread,
Dec 20, 2014, 10:53:54 PM12/20/14
to vagra...@googlegroups.com
hello,

you can add more than 1 network, so you can have a private and a public network.

using the public network, your host will use the network to access it.

so, make sure host and vm are on the same network/netmask, there is no firewall, and the interfaces are correct.

on your line you are using br0, that is a bridge on linux, I assume the host is on linux.. if you know what inteface is being used for that bridge, try to use the interface on that underlying network br0
 
Reply all
Reply to author
Forward
0 new messages