wodby / docker4drupal

Docker-based Drupal stack
https://wodby.com/docker4drupal
MIT License
1.24k stars 535 forks source link

Slow sql file import #315

Open dpliakos opened 6 years ago

dpliakos commented 6 years ago

It takes too much time to import an sql dump file (~20 mins). sql file size: 85.1 MB

When I try to import the sql dump file via mariadb-init folder the process takes too long. I can import the large file (with a non docker setup) pretty fast using drush sql-cli < file.sql. I can execute small sql file on docker4drupal with no problem. I have met the same problem on lando project too. I delete containers and volumes before every docker compose up

My CPU and memory are not pushed or anything.

It seems that maybe it's not wodby/docker4drupal issue.

I found an issues that it's solution may help https://github.com/docker/for-linux/issues/247#issuecomment-389900952

I tried to update the wodby/mariadb to RUN

echo 0 >/sys/block/sda/queue/iosched/slice_idle
echo 0 >/sys/block/sda/queue/iosched/group_idle

but I had some issues during the building and couldn't finish the test.

Thanks for your time

Output of docker info https://gist.github.com/dPliakos/d5f51ed50411c5c4d8ed59f69ddb7476

Contents of your docker-compose.yml https://gist.github.com/dPliakos/7b1cac653c6c78c54172ce77ff095aca

Contents of your .env https://gist.github.com/dPliakos/401e1a4b30b8c4ba3a923b9c184f2b2f

Logs output docker-compose logs https://gist.github.com/dPliakos/6f03e06354b7ed20a7b6853ee7dea723

csandanov commented 6 years ago

Do you have the same performance issue with MariaDB 10.2 and 10.3?

dpliakos commented 6 years ago

Hello! Sorry for the delay. It seems that the issue is still there

adubovskoy commented 4 years ago

+1. huge difference between on-host mariadb and dockerized . Especially during big migrations / imports (> 30gb sql). 40 min on-host mariadb vs 12 hours with d4d mariadb.

adubovskoy commented 3 years ago

Still have this problem, 30+ munutes for 48mb database.