Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
NFS Performance on boot2docker is much worse than on other VMs #1022
I've been trying to rig up a local dev setup using an NFS client on my boot2docker VM, but I've noticed that read performance is far slower than is should be for some workloads. An example of one such access pattern is scanning many smallish files, like a grep through a code repo.
I've run the same file access patterns on some other linux VMs that I've set up manually, and the performance on those VMs has generally been an order of magnitude better than on boot2docker. One of these VMs was Tiny Core Linux v6.3 (on which boot2docker is based), so this does indeed seem to be a product of boot2docker's specific setup.
To reproduce the issue:
Typical results for me:
You can also run
Some setup details (happy to provide more):
I'm going to investigate this issue a bit more, since it makes NFS unusable for us, and I'll definitely follow up here if I find out more.
@jsingle nice catch! On my team we have three last generation of macbook pro with last version of everything on it. On our current Symfony2 dev project, using "PCnet-FAST |||" instead of "Paravirtualized", our homepage on "app_dev.php" environment just go from ~220ms to ~95ms.
FYI, our settings now:
I've been working with @jsingle on investigating this problem. We're seeing really significant network performance gains after moving our NICs to PCnet-FAST III, including about an order of magnitude improvement on NFS performance.
It'd be great if other people could try this out and see if they're noticing the same improvements. If this bug is widespread, which we believe it is, we should look into changing the defaults to PCnet-FAST III.
To re-state the issue: there is a known VBox bug where having multiple virtual CPUs and using Paravirtualized networking (virtio) results in network performance degradation. Both conditions need to hold for the bug to present itself, virtio with only 1 CPU works just fine, as does multiple CPUs with a different network interface. Since multiple CPUs is necessary for compute performance, we prefer moving the network interface to PCnet-FAST III as a solution.
Some additional information regarding Docker Machine since the two projects are linked: the default Docker Machine setup does not seem to exhibit this problem. Starting a new box with the VirtualBox driver in Machine gives you 1 CPU and one of the Intel NIC drivers, so it should be sidestepping the problem entirely.
referenced this issue
Aug 11, 2015
Just want to chime in to confirm that I've seen significant performance gain by switching Adapter 2 from the default Intel PRO/1000 MT Desktop to PCnet-FAST III on OSX. VM is set to 4 cpus + 8GB RAM. I've enabled nfs by using docker-machine-nfs.
My particular use-case is I'm trying to run prospector (code analysis tool for Python). Before the switch it took a ridiculous 11 minutes to complete vs 3.5 minutes after changing adapter. When running directly on the host it takes 74 seconds.