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

change mount options for performance gain #38

Closed
wants to merge 1 commit into from

Conversation

hc2p
Copy link

@hc2p hc2p commented Jan 14, 2016

following the advise found in this article, i changed the mount options accordingly. This gives me way faster results when polling for file-changes inside a container.

@ascariandrea
Copy link

Like ten times faster for a container running webpack with source code mounted as volume 👍

@chrisdostert
Copy link

Unfortunately when I try this my sbt build runs about 3x slower

@tonivdv
Copy link
Member

tonivdv commented Jan 23, 2016

Hey,

This is a tricky change. As you can see it's not a "one setting rules it all" ... I'd be more in favor of providing a command line option to override this (e.g. --mount-opts=xxx).

I already had in mind of having a configuration file located in the user dir (e.g. ~/.docker-machine-nfs.config) in order to be able to define your own defaults which avoids a user to always have to provide it through the command line.

What ya think? :)

Cheers

@alexanderjulo
Copy link

I think to have an option also on the side of boot2docker and not only on the host side makes, sense, but we should still have sensible defaults. Please also refer to hashicorp/vagrant#4204 (comment) where a user took the time to test a set of different options.

For now I just patched my personal docker-machine-nfs to include exactly the options that were also provided in this pull request and the performance has greatly improved.

@tonivdv
Copy link
Member

tonivdv commented Jan 28, 2016

@alexex I completely agree that we should have the most performant default mounting options. I could accept this and see how it goes ... but I still think we should be able to override them without having to change the code base or patch manually like you did :)

Let me try out those and if I don't find any issues I'll merge this.

Thanks for the feedback.

Cheers

@tonivdv
Copy link
Member

tonivdv commented Jan 28, 2016

@chrisdostert On your machine it works faster with the current default values? So if I merge this config it will not suit you at all?!

@j0hnsmith
Copy link

I got

sudo mount -t nfs -o noacl,async,actimeo=2 ...

from gulpjs/gulp#448 and it works well for me (for a gulp watch).

@kilpatty
Copy link

kilpatty commented Feb 5, 2016

+1 Wold like the option to mount with actimeo=2

Edit: I just changed my personal copy of docker-machine-nfs to include all of the options that are in this pull request. I am running gulp watch in a docker container. Before using these edits, when saving a html file on my mac, it would take over a minute for the docker container running gulp watch to recognize it and run the task. After changing these options, that delay has been reduced to under 2 seconds.

@tonivdv
Copy link
Member

tonivdv commented Feb 18, 2016

This is fixed with #45

@tonivdv tonivdv closed this Feb 18, 2016
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.

7 participants