We’ve been experiencing unacceptable performance degradation of our dockerized application when we run them on Mac. The application is a Drupal 8 website running inside two regular containers: web (with apache and mod_php) and db (with mariadb).
We mount two things from the host’s filesystem:
– website’s sources
– regular InnoDB database (a named volume).
On three different Mac machines we have our website running 10-20 times slower them natively on Linux. I don’t speak about milliseconds, no - the impact is severe, our frontpage can load for minutes.
I’d been trying to figure our some reasons of this for 3 months but I didn’t find anything. Then we tried to run our website inside a Vagrant machine and it turned to be 5-6 times faster then in docker.
The only difference between docker and vagrant setups is that in the latter case we have our database running inside the machine (while it’s a named volume in docker).
I then compared configurations of the docker and vagrant VMs and at the very least they are the same, more than that:
– 1) docker VM: 2 × CPU + 16GB RAM
– 2) vagrant VM: 1 × CPU + 2GB RAM
So my question is: what is so wrong with docker on Mac that it is several times slower than Vagrant - in fact a thing which is using just another virtual machine??