Skip to content

MySQL extremely slow just with docker-ce installed #247

@hcomnetworkers

Description

@hcomnetworkers
  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

MySQL fast with docker-ce installed as it is without docker-ce installed.

Actual behavior

MySQL on Ubuntu becomes extremely slow just by having docker-ce installed.

Steps to reproduce the behavior

  • Create a database dump with any test data. E.g. use http://filldb.info to generate a dump. (Our dump is 9.15 MB and is called "fulldb.sql")
  • Install blank new Ubuntu 16.04.04 Desktop edition and follow these steps:
sudo apt-get update
sudo apt-get install mysql-server
mysql -uroot -proot -e 'create database test;'
time mysql -uroot -proot test < fulldb.sql

real	0m5.534s
user	0m0.021s
sys	0m1.116s

sudo apt install curl
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
time mysql -uroot -proot test < fulldb.sql

real	3m39.500s
user	0m0.080s
sys	0m5.379s

sudo systemctl stop docker
sudo ifconfig docker0 down
--> still slow

sudo apt-get purge docker-ce
--> still slow

sudo reboot
--> fast again

We have also tried to use the mysql docker containers from https://hub.docker.com/r/mysql/mysql-server/ and https://hub.docker.com/_/mysql/ on a clean Ubuntu with the same slow result.

We have tried to find an explanation and found other people with a similar problem (e.g. https://forums.docker.com/t/mysql-slow-performance-in-docker/37179). However, we did not find any post describing the slowness already occurring outside the docker container as demonstrated by our reproduction guide above.
We hope that this might be the clue needed to figure out why this is happening. This obviously is not a problem from the containers.

Environment

  • Ubuntu 16.04.04 LTS running in VMware® Workstation 14 Pro 14.1.1 build-7528167 on a Window 10 Pro host.
  • mysql Ver 14.14 Distrib 5.7.21, for Linux (x86_64) using EditLine wrapper
  • Docker version 17.12.1-ce, build 7390fc6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions