Search code examples
dockervirtualboxboot2docker

How can I improve the performance of my Boot2Docker vm


I have been running our SoA on docker on my mac.

It has seven containers:

  • three rails apps
  • rabbit
  • postgres
  • elasticsearch
  • a data volume for rubygems

It runs so slowly compared with my mac. (gulp for example takes 1 hour to read all the files in the manifies on docker but only 10s on the mac).

I increased the memory to 8GB for the VM but it only uses about 2GB so that is not the issue.

Has anyone any ideas (I know this is vague). Perhaps there is some VM tuning I can do. I have a suspicion that this has to do with file io but I am not knowledgable enough to know how to validate that not to mind tune the VM enough to resolve it.

Note: the rails apps are mounted from a volume from the host mac. And similarly postgres, rabbit, and elasticseach store there data on a volume mounted from the mac also.


Solution

  • Performance of the mounted host folders is not very good with boot2docker on mac. Can be an issue with disk-intensive processes. A workaround I employ is to use vagrant provisioned docker, map host files there and run docker tasks from within vagrant. Bit cumbersome, but not too bad and performance is way better.