question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider adding the 'delegated' flag to boost docker perf. on macOS

See original GitHub issue

Is your feature request related to a problem? Please describe. Building project using docker on macOS is notoriously slow, after some googling, I found that there’s some ways to boost the performance of this process.

I post the link to the posts I read in here just in case someone want some reference Performance tuning docker for mac(from community blog) Performance tuning for volume mounts (shared filesystems)(official doc)

Here’s the link to performance comparison Docker on Mac Performance: Docker Machine vs Docker for Mac

Here’s the GitHub issue related to the subject Pertinent Issue

In a nutshell, building project with docker on mac is unbearably slow, so, I use delegated flag when run docker,

here’s the screenshot on how I modified my docker-compose.yaml to make the build process from almost forever to just a few second: (I still modify a section but there’s no enough space to include that to the screenshot, anyway, you can tell from the preview pane on the upper right😅) image

Describe the solution you’d like So, I suggest include this change to yaml file in the project, or(see next)

Describe alternatives you’ve considered Add an extra notice to the contribution doc, letting those who use mac be aware this issue and let them know how to alleviate the pain.

PS: I’m also happy to help with this issue😆

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
renntbenrenntcommented, Aug 17, 2020

@raisedadead Hey, man, thanks for the advice and sorry for not keeping the update or work on it for several days, I’m currently dealing with some life emergency, and magically, the only thing that can let me feel less painful or pain-free is immerse myself in the world of coding😂 how crazy!

Anyway, I just opened a PR and hopefully that can help a lot of people using mac and try to build the project from docker~

PS: I kind of favor adding a note on the guide to remind those with mac to do the delegated flag thing when they build the project, because slow building only happen on mac I think, although this could lead to problems like forgot to remove the flag in the file when they commit so they push to the remote and cause a lot of conflicts…

Anyway, adding this flag while building on PC or Linux shouldn’t cause any problem I think, because delegated means the change between host and container is not in sync immediately… hmm… sounds like a problem… but for more on it I think you should consult the docker doc I posted above😅

1reaction
raisedadeadcommented, Aug 13, 2020

Lets start by adding the flag like you have tested. We could merge the PR and keep it under observation for a few days. We could add a warning or remove/overhaul the docker setup if the flags break something, later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance tuning for volume mounts (shared filesystems)
Docker 17.04 CE Edge adds support for two new flags to the docker run -v , --volume option, cached and delegated , that...
Read more >
Speed boost achievement unlocked on Docker Desktop 4.6 ...
Firstly, developers now have the option of using a new experimental file sharing implementation called virtiofs (the current default is gRPC- ...
Read more >
Beating some performance into Docker for Mac - Medium
The IO speeds were better than the normal D4M speeds, but on-par with flagged volumes (:delegated). That sucks. screen ~/Library/Containers/com.
Read more >
How do I add :cached or :delegated into a docker-compose ...
The Docker volumes flags are: consistent or default : The default setting with full consistency, as described above. delegated : The ...
Read more >
Docker volumes: cached vs delegated - Lukasz Tkacz Blog
Docker provides two methods for caching and speed up: both doesn't provide such consistency but can improve performance a lot.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found