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

Add Docker Delegated Consistency to Volume #1046

Merged
merged 1 commit into from
Apr 4, 2019
Merged

Conversation

metaskills
Copy link
Contributor

@metaskills metaskills commented Mar 10, 2019

ISSUE: Performance for Docker runs using sam local start-api on Mac is horrible. I benchmarked requiring a large Ruby application at ~45seconds.

FIX: Resolve Docker on Mac performance issues by allowing the project folder to be mounted as both "read only" (current behavior) and "delegated". The docs for Docker mention that a comma-separated list is an allowed value. Hence I maintained the ro mode and simply added delegated to the list. Doc: https://docs.docker.com/v17.09/engine/admin/volumes/volumes/

Please see this article for a description of the new option added. https://docs.docker.com/docker-for-mac/osxfs-caching/. If tests pass, I assume this option being added is a noop for non Mac platforms.

@metaskills
Copy link
Contributor Author

OH! Performance for my application's require went down to ~5seconds after this change.

Resolve Docker on Mac performance issues (https://docs.docker.com/docker-for-mac/osxfs-caching/) by allowing the project folder to be mounted as both "read only" (current behavior) and "delegated".
@metaskills
Copy link
Contributor Author

OK, just pushed up some test changes which should get things green.

@metaskills
Copy link
Contributor Author

Could you re-run the tests? The failure looks like a random one.

@sriram-mv
Copy link
Contributor

What kind of guarantees does this affect?

@metaskills
Copy link
Contributor Author

None that I know of, especially given the mount was read-only to begin with. Did you have a specific guarantee in mind @thesriram?

@sanathkr
Copy link
Contributor

sanathkr commented Apr 4, 2019

After reading through https://docs.docker.com/docker-for-mac/osxfs-caching/, I am convinced that delegated is sufficient for a read-only bind mount where we need NO consistency between host and container file system (except at start up).

Thanks for digging through Docker and making this change. I think many customers will find this valuable, especially on Mac.

@sanathkr sanathkr merged commit fa3b994 into aws:develop Apr 4, 2019
@metaskills metaskills deleted the patch-1 branch March 25, 2020 18:58
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.

3 participants