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

Incredibly Slow on Mac #7

Open
Sylk opened this issue Mar 25, 2020 · 4 comments
Open

Incredibly Slow on Mac #7

Sylk opened this issue Mar 25, 2020 · 4 comments

Comments

@Sylk
Copy link

Sylk commented Mar 25, 2020

I'm not sure if it's a Docker problem or it's this docker container particularly. But I'm trying to get this to run and a single login request takes 4.1 seconds to process.

What can I do to increase the speed of this? At this point I'm considering Valet instead of the Docker approach.

@smlparry
Copy link

smlparry commented Apr 11, 2020

Hey @Sylk, I was having the same issue as you, turns out its a docker issue where I/O assess is very slow on Mac

I used this article to setup an nfs mounted volume, and now Im getting much faster speeds, highly recommend:
https://medium.com/@sean.handley/how-to-set-up-docker-for-mac-with-native-nfs-145151458adc

@rizkysyazuli
Copy link

rizkysyazuli commented Apr 14, 2020

As mentioned before. The file sync operation between your mac's file system and the container is very slow. The trick is to enable the delegated or cached flags when mounting your volumes.

nginx:
    volumes:
      - './statamic:/var/www/statamic-site:delegated'

The default is consistent, this means perfect consistency between the host and container files. Which takes a lot of resources. But those two flags allows for some delays. Read more about it here.

And.. you might also want to increase the CPU amount in the Resource settings.

EDIT: honestly, i use Valet on my Mac. The above trick helps, but the speed of development is still slower than native/locally installed servers.

@smlparry
Copy link

Yeah, I ended up going with valet too. I would prefer docker, but yeah the performance is miles better with Valet.

Thats interesting though! Ive never seen that before, thanks!

@oranges13
Copy link

Docker on Mac has been having a ton of issues since they updated to 3.x -- highly suggest you downgrade to 2.5.0.1 as that was the last stable version. So this isn't an issue with this repo, but an issue with Docker for Mac recently.

See docker/for-mac#5406, docker/for-mac#4957

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

No branches or pull requests

4 participants