-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance improvement mount www #187
Comments
Hi @luukverhoeven, HTH, |
Thanks for the tip @scara! It doesn't work directly out of the box. After that, I remove the prefix. After this, it works. This benchmarks of a Drupal test in docker https://www.jeffgeerling.com/blog/2020/revisiting-docker-macs-performance-nfs-volumes looks also interesting. For testing, volumes-nfs.yml# Here we support https://vivait.co.uk/labs/docker-for-mac-performance-using-nfs
# for improved performance on mac
version: "2"
services:
webserver:
volumes:
- /var/www/html
bg-sync:
image: cweagans/bg-sync
volumes:
- "${MOODLE_DOCKER_WWWROOT}:/source"
volumes_from:
- webserver
environment:
- SYNC_DESTINATION=/var/www/html
- SYNC_MAX_INOTIFY_WATCHES=40000
- SYNC_VERBOSE=1
privileged: true Benchmark on macOS Big Sure M1 (docker 20.10.8)docker-bg-syncThe 19.3 secs NFSThe Creating an M course: 19.6 secs The most significant difference is when requesting pages with |
Hi @odeialba, Disclaimer: I'm a Linux/Windows user, no mac on my side. TIA, |
Hi @luukverhoeven, These are the logs in bg-sync container:
It is important to point out that if I change |
@odeialba Did you give the Also, your docker need access to the Moodle directory. When you use docker desktop, you can find it here. |
@luukverhoeven I still couldn't make it work. |
Strange, I tested your branch, and it also works here. export MOODLE_DOCKER_WWWROOT=/Users/luukverhoeven/OPENSOURCE/moodle
cd /Users/luukverhoeven/OPENSOURCE/moodle_docker_clone
bin/moodle-docker-compose up -d |
@luukverhoeven I understand that that is the bg-sync container. |
@luukverhoeven No matter how long I wait, it does not change: |
@odeialba Which directory did you mount on |
Can you check if the following config helps? volumes-sync.yml version: "2"
services:
webserver:
volumes:
- /var/www/html
bg-sync:
image: kitertjuh/docker-bg-sync
volumes:
- "${MOODLE_DOCKER_WWWROOT}:/source"
volumes_from:
- webserver
environment:
- SYNC_DESTINATION=/var/www/html
- SYNC_MAX_INOTIFY_WATCHES=40000
- SYNC_VERBOSE=1
privileged: true |
@luukverhoeven That directory contains two instances of moodle (wp and lms) and one of adminer. I tried your suggestion, but the result is exactly the same. |
Maybe it's caused by the 3 directory structure and many files. |
@luukverhoeven Still not working. The only difference is that |
Can you give me more information about your system, docker version / config , directory location etc. |
|
@odeialba Thanks for the information. I will investigate this soon on a new VM with macOS Big Sur. |
@odeialba I recorded the debugging on the VM. The VM is a fresh installation of macOS Big Sur and a default installation of docker desktop. The conclusion is that patience is the key ;) |
@luukverhoeven I finally made it work (FYI I couldn't make |
@odeialba The speed of this moodle docker instance inside moodle is very slow. The mailhog UI responds immediately, so I assume it is just due to the number of files in the moodle source folder? I have no experience with docker-sync, but I am also trying to have as simple configuration as possible so I can expose my work peers to Docker.... any recommendations how to deal with thi? |
@nwallis Try with these changes https://github.com/moodlehq/moodle-docker/pull/183/files |
Hey yah @odeialba! Thanks a lot for this. Btw, do I need to run the nfs script every time I |
Hi @mplt-aleks |
Hey @odeialba. Alright got that. I'm currently trying this now and man the moodle installation took just 1 or 2 minutes unlike before it was about 20 minutes to finished. I'm running M1 Pro chip and I've been struggling with the smooth setup. Cheers! |
The current Mac performance solution is to enable both the experimental settings (virtualisation and VirtioFS) in the preferences of Docker Desktop. See https://www.docker.com/blog/speed-boost-achievement-unlocked-on-docker-desktop-4-6-for-mac/ (it will boost your performance like crazy - no more 40mn docker install) |
Hi @odeialba, the NFS solution doesn't seem to work anymore with these recent macOS and Docker updates. Do you still have yours working? Tried a fresh install, still no luck. Was planning to do the same above(@mouneyrac ), the enabling of VirtioFS, but docker won't start when it's on( MacOS: 12.6
|
Moodle has many files, when docker mounts your local files system it has bad performance by default (tested on Intel mac and M1).
Did someone test to implement https://github.com/EugenMayer/docker-sync into this project or another way to improve the speed?
--
Today I did a test with
docker-sync
the performance were much better.The text was updated successfully, but these errors were encountered: