Performance issues with mysql docker container
I migrated my mysql database to docker and I restored a dump file. My mysql server was instaled directly on Linux, and I had not issues. On docker container my queries is 30x slower. Someone had a similar problem? I am running docker on Ubuntu 16 and I am using the following docker compose:
version: '3'
services:
db:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
- ~/mysql/:/var/lib/mysql/
ports:
- "3306:3306"
web:
build: .
volumes:
- .:/var/www/html/app/
ports:
- "80:80"
depends_on:
- db
mysql docker
add a comment |
I migrated my mysql database to docker and I restored a dump file. My mysql server was instaled directly on Linux, and I had not issues. On docker container my queries is 30x slower. Someone had a similar problem? I am running docker on Ubuntu 16 and I am using the following docker compose:
version: '3'
services:
db:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
- ~/mysql/:/var/lib/mysql/
ports:
- "3306:3306"
web:
build: .
volumes:
- .:/var/www/html/app/
ports:
- "80:80"
depends_on:
- db
mysql docker
Can you dump your docker info, also which filesystem do you use and with which flags are they mounted?
– Sander Visser
Jan 2 at 13:36
github.com/docker/for-linux/issues/247 also there is some worthfull information there
– Sander Visser
Jan 2 at 13:37
add a comment |
I migrated my mysql database to docker and I restored a dump file. My mysql server was instaled directly on Linux, and I had not issues. On docker container my queries is 30x slower. Someone had a similar problem? I am running docker on Ubuntu 16 and I am using the following docker compose:
version: '3'
services:
db:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
- ~/mysql/:/var/lib/mysql/
ports:
- "3306:3306"
web:
build: .
volumes:
- .:/var/www/html/app/
ports:
- "80:80"
depends_on:
- db
mysql docker
I migrated my mysql database to docker and I restored a dump file. My mysql server was instaled directly on Linux, and I had not issues. On docker container my queries is 30x slower. Someone had a similar problem? I am running docker on Ubuntu 16 and I am using the following docker compose:
version: '3'
services:
db:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
- ~/mysql/:/var/lib/mysql/
ports:
- "3306:3306"
web:
build: .
volumes:
- .:/var/www/html/app/
ports:
- "80:80"
depends_on:
- db
mysql docker
mysql docker
asked Jan 2 at 13:21


ClarencioClarencio
1
1
Can you dump your docker info, also which filesystem do you use and with which flags are they mounted?
– Sander Visser
Jan 2 at 13:36
github.com/docker/for-linux/issues/247 also there is some worthfull information there
– Sander Visser
Jan 2 at 13:37
add a comment |
Can you dump your docker info, also which filesystem do you use and with which flags are they mounted?
– Sander Visser
Jan 2 at 13:36
github.com/docker/for-linux/issues/247 also there is some worthfull information there
– Sander Visser
Jan 2 at 13:37
Can you dump your docker info, also which filesystem do you use and with which flags are they mounted?
– Sander Visser
Jan 2 at 13:36
Can you dump your docker info, also which filesystem do you use and with which flags are they mounted?
– Sander Visser
Jan 2 at 13:36
github.com/docker/for-linux/issues/247 also there is some worthfull information there
– Sander Visser
Jan 2 at 13:37
github.com/docker/for-linux/issues/247 also there is some worthfull information there
– Sander Visser
Jan 2 at 13:37
add a comment |
1 Answer
1
active
oldest
votes
thank you for your help.
Docker info:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 13
Server Version: 18.09.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runcInit Binary: docker-initcontainerd version: c4446665cb9c30056f4998ed953e6d4ff22c7c39runc version: 4fc53a81fb7c994640722ac585fa9ca548971871init version: fec3683Security Options: apparmor seccomp Profile: defaultKernel Version: 4.15.0-1021-awsOperating System: Ubuntu 18.04.1 LTSOSType: linuxArchitectu re: x86_64CPUs: 1Total Memory: 983.9MiB
Name: ip-172-31-73-156
ID: VESU:SBIN:X434:OXL Q:X3OX:ZUAZ:SQKU:XHH7:5WJ7:C6F2:P4GE:SZLV
Docker Root Dir: /var/ lib/docker
Debug Mode (client): f alse
Debug Mode (server): f alse
Registry: https://inde x.do cker.io/v1/
Labels:
Experim ental: false
Insecur e Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Filesystem:
GNU Parted 3.2
Using /dev/xvda1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Unknown (unknown)
Disk /dev/xvda1: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 21.5GB 21.5GB ext4
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54007137%2fperformance-issues-with-mysql-docker-container%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
thank you for your help.
Docker info:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 13
Server Version: 18.09.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runcInit Binary: docker-initcontainerd version: c4446665cb9c30056f4998ed953e6d4ff22c7c39runc version: 4fc53a81fb7c994640722ac585fa9ca548971871init version: fec3683Security Options: apparmor seccomp Profile: defaultKernel Version: 4.15.0-1021-awsOperating System: Ubuntu 18.04.1 LTSOSType: linuxArchitectu re: x86_64CPUs: 1Total Memory: 983.9MiB
Name: ip-172-31-73-156
ID: VESU:SBIN:X434:OXL Q:X3OX:ZUAZ:SQKU:XHH7:5WJ7:C6F2:P4GE:SZLV
Docker Root Dir: /var/ lib/docker
Debug Mode (client): f alse
Debug Mode (server): f alse
Registry: https://inde x.do cker.io/v1/
Labels:
Experim ental: false
Insecur e Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Filesystem:
GNU Parted 3.2
Using /dev/xvda1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Unknown (unknown)
Disk /dev/xvda1: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 21.5GB 21.5GB ext4
add a comment |
thank you for your help.
Docker info:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 13
Server Version: 18.09.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runcInit Binary: docker-initcontainerd version: c4446665cb9c30056f4998ed953e6d4ff22c7c39runc version: 4fc53a81fb7c994640722ac585fa9ca548971871init version: fec3683Security Options: apparmor seccomp Profile: defaultKernel Version: 4.15.0-1021-awsOperating System: Ubuntu 18.04.1 LTSOSType: linuxArchitectu re: x86_64CPUs: 1Total Memory: 983.9MiB
Name: ip-172-31-73-156
ID: VESU:SBIN:X434:OXL Q:X3OX:ZUAZ:SQKU:XHH7:5WJ7:C6F2:P4GE:SZLV
Docker Root Dir: /var/ lib/docker
Debug Mode (client): f alse
Debug Mode (server): f alse
Registry: https://inde x.do cker.io/v1/
Labels:
Experim ental: false
Insecur e Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Filesystem:
GNU Parted 3.2
Using /dev/xvda1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Unknown (unknown)
Disk /dev/xvda1: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 21.5GB 21.5GB ext4
add a comment |
thank you for your help.
Docker info:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 13
Server Version: 18.09.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runcInit Binary: docker-initcontainerd version: c4446665cb9c30056f4998ed953e6d4ff22c7c39runc version: 4fc53a81fb7c994640722ac585fa9ca548971871init version: fec3683Security Options: apparmor seccomp Profile: defaultKernel Version: 4.15.0-1021-awsOperating System: Ubuntu 18.04.1 LTSOSType: linuxArchitectu re: x86_64CPUs: 1Total Memory: 983.9MiB
Name: ip-172-31-73-156
ID: VESU:SBIN:X434:OXL Q:X3OX:ZUAZ:SQKU:XHH7:5WJ7:C6F2:P4GE:SZLV
Docker Root Dir: /var/ lib/docker
Debug Mode (client): f alse
Debug Mode (server): f alse
Registry: https://inde x.do cker.io/v1/
Labels:
Experim ental: false
Insecur e Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Filesystem:
GNU Parted 3.2
Using /dev/xvda1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Unknown (unknown)
Disk /dev/xvda1: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 21.5GB 21.5GB ext4
thank you for your help.
Docker info:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 13
Server Version: 18.09.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runcInit Binary: docker-initcontainerd version: c4446665cb9c30056f4998ed953e6d4ff22c7c39runc version: 4fc53a81fb7c994640722ac585fa9ca548971871init version: fec3683Security Options: apparmor seccomp Profile: defaultKernel Version: 4.15.0-1021-awsOperating System: Ubuntu 18.04.1 LTSOSType: linuxArchitectu re: x86_64CPUs: 1Total Memory: 983.9MiB
Name: ip-172-31-73-156
ID: VESU:SBIN:X434:OXL Q:X3OX:ZUAZ:SQKU:XHH7:5WJ7:C6F2:P4GE:SZLV
Docker Root Dir: /var/ lib/docker
Debug Mode (client): f alse
Debug Mode (server): f alse
Registry: https://inde x.do cker.io/v1/
Labels:
Experim ental: false
Insecur e Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Filesystem:
GNU Parted 3.2
Using /dev/xvda1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Unknown (unknown)
Disk /dev/xvda1: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 21.5GB 21.5GB ext4
answered Jan 2 at 22:41


ClarencioClarencio
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54007137%2fperformance-issues-with-mysql-docker-container%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you dump your docker info, also which filesystem do you use and with which flags are they mounted?
– Sander Visser
Jan 2 at 13:36
github.com/docker/for-linux/issues/247 also there is some worthfull information there
– Sander Visser
Jan 2 at 13:37