Skip to content
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

Use NFS for Mac users #183

Closed
wants to merge 1 commit into from

Conversation

odeialba
Copy link

@odeialba odeialba commented Sep 1, 2021

Docker is very slow for mac users (mainly when installing the db from scratch or setting up behat and phpunit and running them).
To fix that, we are able to use NFS. This PR uses NFS for Mac users instead of the old :cached.

Source: https://vivait.co.uk/labs/docker-for-mac-performance-using-nfs

@crazyserver
Copy link
Member

This is working very well for me, can we get that integrated?

@stronk7
Copy link
Member

stronk7 commented Jun 8, 2022

Hi @odeialba ,

nice improvement, if it really helps the mac experience.

I've not been able to review it with detail... but wanted to share something that, IMO, is a requirement for new code like this to land.

And it's that we must guarantee backwards compatibility 100%, making new stuff completely optional.

So, if I'm using here moodle-docker via scripts (or in some CI/pipeline) it MUST continue working without modifications (or will break badly everywhere). And I'm not sure that this PR supports that (it seems that the new nfs stuff is called unconditionally).

I'd suggest some optional env var, well documented in order to "activate and use" the nfs thing. Guaranteeing that, if that option isn't enabled... old behaviour is 100% the same.

Surely the bash script can be set with execution perms in git (like the rest of shell scripts are) and we don't need to perform the manual chmod.

Also... it must be clear if that script needs to be executed only once or always and, maybe, there should be a way to move aways from nfs (back to normal) too.

Ciao :-)

@mouneyrac
Copy link

The current Mac performance solution is to enable both the experimental settings (virtualisation and VirtioFS) in the preferences of Docker Desktop.

Docker Desktop Preference Settings

See https://www.docker.com/blog/speed-boost-achievement-unlocked-on-docker-desktop-4-6-for-mac/

@skodak
Copy link
Contributor

skodak commented Sep 27, 2022

I find the performance on M2 mac satisfactory if "new virtualisation framework" and "VirtioFS" enabled from experimental settings.

@crazyserver
Copy link
Member

Thanks @mouneyrac and @skodak ,
I also think this issue can be closed.

@stronk7
Copy link
Member

stronk7 commented Sep 27, 2022

Thanks all!

@stronk7 stronk7 closed this Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants