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

docker-sync support #105

Open
bsormagec opened this Issue Aug 5, 2017 · 22 comments

Comments

Projects
None yet
9 participants
@bsormagec

bsormagec commented Aug 5, 2017

I think docker-sync support will be good for mac because docker has poor performance on osx. Can you add this to devilbox ?

@cytopia

This comment has been minimized.

Owner

cytopia commented Aug 8, 2017

@bsormagec thanks for pointing it out. Can you direct me to some more documentation about this.

@cytopia cytopia self-assigned this Aug 8, 2017

@cytopia cytopia added the feature label Aug 11, 2017

@bsormagec

This comment has been minimized.

@vzlatev

This comment has been minimized.

vzlatev commented Dec 8, 2017

Hello,

Any plans to include it in the upcoming releases - on OSX without docker-sync web apps are awfully slow.

Regards

@richdel

This comment has been minimized.

richdel commented Jan 17, 2018

+1, without docker-sync there are a couple of options for os x when mounting shares using bind mounts:

  • consistent or default: The default setting with full consistency, as described above.
  • delegated: The container runtime’s view of the mount is authoritative. There may be delays before updates made in a container are visible on the host.
  • cached: The macOS host’s view of the mount is authoritative. There may be delays before updates made on the host are visible within a container.

(Source: https://docs.docker.com/engine/admin/volumes/bind-mounts/#configure-mount-consistency-for-macos)

Unfortunately though none of them appear to resolve the bi-directional sync without huge performance overheads (in the case of the default consistent setting) or persistence issues (e.g. if uploading images to a cms and building up a site's content locally with the docker container instance). Using vagrant in the past for large Magento builds I tried both unison and gatling-rsync, the latter being more performant and the final solution chosen which worked wonders. It ended up being a v similar setup to the docker-sync native_osx implementation, more reading material here:

As an aside a short term workaround to resolve performance issues at the moment is to use memcache/redis caching which works really well, managed to get a basic WordPress instance sub 80ms fully rendered in the browser!

@mad99

This comment has been minimized.

mad99 commented Apr 23, 2018

Any news about a well usable and reasonably fast system under osx?

Have tried to extend the Makefile on my own (process to include docker-sync-stack). But it does not work well...
Maybe someone else is also to try to do this way. Would great to share or hear from news in this directions!

@cytopia

This comment has been minimized.

Owner

cytopia commented Apr 24, 2018

This is still on the agenda, however the roadmap is currently really filled and me alone working on that takes some time. Probably somebody wants to jump in on this issue and submit a PR.

@johnwbaxter

This comment has been minimized.

johnwbaxter commented Jun 26, 2018

I tried setting up docker-sync but ended up somehow making docker use 400% cpu...will try again though as it's almost unusable on OSX as it stands.

@johnwbaxter

This comment has been minimized.

johnwbaxter commented Jul 2, 2018

@cytopia What would it cost to sponsor you to move this to the top of the list?

@cytopia

This comment has been minimized.

Owner

cytopia commented Jul 4, 2018

@johnwbaxter I'd rather have someone helping me on this issue, as I dont' have a Mac at the moment. So I cannot get sponsored on this one and make an unreliable promises/guess. But thank you for bringing this up.

@cytopia cytopia added the host:osx label Jul 5, 2018

@cytopia

This comment has been minimized.

Owner

cytopia commented Aug 7, 2018

There seems to be a native approach by Docker for volume mounts with the following options:

  • consistent
  • cached
  • delegated

How would one of those strategy perform against the current mount options:

https://docs.docker.com/docker-for-mac/osxfs-caching/#tuning-with-consistent-cached-and-delegated-configurations

Might give it a try. If this does not work out, I will have alook into docker-sync

@cytopia

This comment has been minimized.

Owner

cytopia commented Aug 12, 2018

@cytopia cytopia removed the help wanted label Sep 30, 2018

@ericfynnmaier

This comment has been minimized.

ericfynnmaier commented Oct 2, 2018

Has anyone solved this problem by using docker-sync or the global mount options? If yes, could you please tell us your configuration? Thanks in advance!

@cytopia

This comment has been minimized.

Owner

cytopia commented Oct 2, 2018

@ericfynnmaier have you already tried one of these:

MOUNT_OPTIONS=,consistent
MOUNT_OPTIONS=,cached
MOUNT_OPTIONS=,delegated

Probably ,cached will give you some performance boost. I have no OSX anymore to try. Can you give it a shot and report how well it performs in terms of the empty default

@ericfynnmaier

This comment has been minimized.

ericfynnmaier commented Oct 2, 2018

@cytopia thank you! I added ,cached to the .env and e.g. Wordpress loads way faster!

cytopia added a commit that referenced this issue Nov 1, 2018

cytopia added a commit that referenced this issue Nov 1, 2018

Merge pull request #407 from cytopia/documentation-performance-osx
Refs #105 document how to mitigate OSX performance issues
@vielhuber

This comment has been minimized.

vielhuber commented Nov 6, 2018

,cached only seems to improve performance on mac, but not windows.
how do windows people work with devilbox in a performant manner?

@cytopia

This comment has been minimized.

Owner

cytopia commented Nov 6, 2018

@vielhuber I haven't looked into Windows yet for those kinds of performance improvements. Any idea what alternatives are offered for Windows

@vielhuber

This comment has been minimized.

vielhuber commented Nov 6, 2018

The only tool everybody is mentionning is "docker-sync" (http://docker-sync.io/).
This seems to solve the problems everywhere.
But it seems quite complex to install on Windows.

@cytopia

This comment has been minimized.

Owner

cytopia commented Nov 6, 2018

OK, didn't know that this also works on Windows.

@vielhuber

This comment has been minimized.

vielhuber commented Nov 6, 2018

On which OS do you work?
Do you also suffer from performance problems like everybody else when spinning up a normal Laravel project?

@cytopia

This comment has been minimized.

Owner

cytopia commented Nov 6, 2018

I started this project on OSX and am now on Debian Linux. So far no performance issues (on Linux).

Update: I even tried Magento and Shopware, both very heavy projects and they have a decent speed on my machine.

@vielhuber

This comment has been minimized.

vielhuber commented Nov 6, 2018

Nice; Linux seems to have zero problems.

One temporary solution: Can we disable all filemounts in devilbox and to the sync on our own (e.g. with GoodSync via SSH)?

@jeffwhitfield

This comment has been minimized.

jeffwhitfield commented Nov 9, 2018

I would love to know how to get docker-sync working with Devilbox. Running Magento on my Mac is absolutely atrocious! Tried everything but docker-sync which, based on what I'm reading, will result in a serious performance bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment