Speed on OS X #4

Closed
tanc opened this Issue Jul 21, 2016 · 19 comments

Comments

Projects
None yet
9 participants
@tanc
Contributor

tanc commented Jul 21, 2016

I've been experimenting with the Docker for Mac beta and had set up something similar with persistent database storage using the OS X file system. I haven't tried your version yet but I was wondering how you find the speed? On my set up it was unusable for Drupal development.

I've had to go back to a Parallels based VM running boot2docker and NFS for file sharing. This makes for a nice speedy set up but I can't use the local filesystem for database storage due to permissions issues.

@csandanov

This comment has been minimized.

Show comment
Hide comment
@csandanov

csandanov Jul 26, 2016

Contributor

From what I know the older Docker version (<1.12) used virtualbox with slow vboxfs. The new docker app uses xhyve, which is much faster. Make sure you're using the new 1.12 version of Docker which actually is still in beta.

Contributor

csandanov commented Jul 26, 2016

From what I know the older Docker version (<1.12) used virtualbox with slow vboxfs. The new docker app uses xhyve, which is much faster. Make sure you're using the new 1.12 version of Docker which actually is still in beta.

@tanc

This comment has been minimized.

Show comment
Hide comment
@tanc

tanc Jul 26, 2016

Contributor

In my experience the new Docker for Mac beta is still unusable for Drupal development but I'll give your set up a go and see if there are any improvements. The bottleneck is the filesystem and hosting the database locally is a killer. Using NFS is a lot faster but the beta doesn't support it.

Contributor

tanc commented Jul 26, 2016

In my experience the new Docker for Mac beta is still unusable for Drupal development but I'll give your set up a go and see if there are any improvements. The bottleneck is the filesystem and hosting the database locally is a killer. Using NFS is a lot faster but the beta doesn't support it.

@artemkolotilkin

This comment has been minimized.

Show comment
Hide comment
@artemkolotilkin

artemkolotilkin Jul 26, 2016

I'm only installing Drupal using docker4drupal, but can already see that it's pretty slow, comparing to drupalvm (vagrant + parallels).
Otherwise, installation and setup is a breeze and have a great potential!

I'm only installing Drupal using docker4drupal, but can already see that it's pretty slow, comparing to drupalvm (vagrant + parallels).
Otherwise, installation and setup is a breeze and have a great potential!

@csandanov

This comment has been minimized.

Show comment
Hide comment
@csandanov

csandanov Jul 27, 2016

Contributor

@artemkolotilkin could you give us more details, what is your docker version? As I mentioned above the performance should be much better with docker 1.12+

Contributor

csandanov commented Jul 27, 2016

@artemkolotilkin could you give us more details, what is your docker version? As I mentioned above the performance should be much better with docker 1.12+

@artemkolotilkin

This comment has been minimized.

Show comment
Hide comment
@artemkolotilkin

artemkolotilkin Jul 27, 2016

Sure. I'm on OSX 10.11.6, using Docker version 1.12.0-rc4-beta20 (build: 10404). Have 2 separate Drupal 8 sites running:

  1. Vagrant - Status report page opens in 1.2 sec
  2. Docker - Status report page opens in 5.1 sec

Let me know if you need more info!

Sure. I'm on OSX 10.11.6, using Docker version 1.12.0-rc4-beta20 (build: 10404). Have 2 separate Drupal 8 sites running:

  1. Vagrant - Status report page opens in 1.2 sec
  2. Docker - Status report page opens in 5.1 sec

Let me know if you need more info!

@PavelPrischepa

This comment has been minimized.

Show comment
Hide comment
@PavelPrischepa

PavelPrischepa Jul 27, 2016

Contributor

@artemkolotilkin it's possible xdebug issue. I've integrated flag to enable/disable xdebug.
Could you check it again? Pay attention on "PHP_XDEBUG_ENABLED: 0" env var in the compose file.

Contributor

PavelPrischepa commented Jul 27, 2016

@artemkolotilkin it's possible xdebug issue. I've integrated flag to enable/disable xdebug.
Could you check it again? Pay attention on "PHP_XDEBUG_ENABLED: 0" env var in the compose file.

@tanc

This comment has been minimized.

Show comment
Hide comment
@tanc

tanc Jul 27, 2016

Contributor

I've had a bit of time to test this and so far I'm impressed with the speed. Its pretty fast on a new D8 site, whether PHP7 or 5.6 is used and whether xdebug is enabled or not. I'm going to do some development on an existing D7 site and see how the speed goes with that. Great work!

Contributor

tanc commented Jul 27, 2016

I've had a bit of time to test this and so far I'm impressed with the speed. Its pretty fast on a new D8 site, whether PHP7 or 5.6 is used and whether xdebug is enabled or not. I'm going to do some development on an existing D7 site and see how the speed goes with that. Great work!

@artemkolotilkin

This comment has been minimized.

Show comment
Hide comment
@artemkolotilkin

artemkolotilkin Jul 28, 2016

@PavelPrischepa I've just done another try with latest version and PHP_XDEBUG_ENABLED set to 0 and can definitely see an improvement, although it's not significant. On a vanilla Drupal 8 install Status report page opens in 3.8 - 4.2 seconds which is less than 5 seconds it used to be, but still far slower comparing to Vagrant (1.2 seconds).

@PavelPrischepa I've just done another try with latest version and PHP_XDEBUG_ENABLED set to 0 and can definitely see an improvement, although it's not significant. On a vanilla Drupal 8 install Status report page opens in 3.8 - 4.2 seconds which is less than 5 seconds it used to be, but still far slower comparing to Vagrant (1.2 seconds).

@zanami

This comment has been minimized.

Show comment
Hide comment
@zanami

zanami Jul 28, 2016

There's a very long thread at Docker forums.
In short, mounting host folders (code/database) leads to unacceptable performance.
I haven't tried docker4drupal but I can't see how it could be different in this regard.
It seems that the only viable solution is some kind of rsync (host to guest) or unison (bidirectional) syncing. I'm using docker-sync.
That's an OK solution for the code but I doubt you can use it for DB so I just use a separate named (persistent) volume for that. This way Drupal is at least 5-10 times faster.

zanami commented Jul 28, 2016

There's a very long thread at Docker forums.
In short, mounting host folders (code/database) leads to unacceptable performance.
I haven't tried docker4drupal but I can't see how it could be different in this regard.
It seems that the only viable solution is some kind of rsync (host to guest) or unison (bidirectional) syncing. I'm using docker-sync.
That's an OK solution for the code but I doubt you can use it for DB so I just use a separate named (persistent) volume for that. This way Drupal is at least 5-10 times faster.

@csandanov

This comment has been minimized.

Show comment
Hide comment
@csandanov

csandanov Jul 29, 2016

Contributor

Yes, there are a few performance issues with osxfs, check out this post from a Docker Inc engineer to learn more. Docker sync looks interesting, I will check it out.
Also, consider using redis/memcached to decrease db requests.

Contributor

csandanov commented Jul 29, 2016

Yes, there are a few performance issues with osxfs, check out this post from a Docker Inc engineer to learn more. Docker sync looks interesting, I will check it out.
Also, consider using redis/memcached to decrease db requests.

@guiajlopes

This comment has been minimized.

Show comment
Hide comment
@guiajlopes

guiajlopes Aug 8, 2016

on OSX and Windows docker is slow, it's because it runs on VM instead of Linux Container. For Linux, it should be faster

on OSX and Windows docker is slow, it's because it runs on VM instead of Linux Container. For Linux, it should be faster

@tanc

This comment has been minimized.

Show comment
Hide comment
@tanc

tanc Aug 8, 2016

Contributor

It's not too do with the VM, it's the filesystem osfx which is slow. There is plenty of documentation about it. On Linux this isn't an issue

Contributor

tanc commented Aug 8, 2016

It's not too do with the VM, it's the filesystem osfx which is slow. There is plenty of documentation about it. On Linux this isn't an issue

@fabianderijk

This comment has been minimized.

Show comment
Hide comment
@fabianderijk

fabianderijk Sep 1, 2016

Is there any progress on this issue? I would like to use docker4drupal, but it's just not performing OK.

Is there any progress on this issue? I would like to use docker4drupal, but it's just not performing OK.

@tanc

This comment has been minimized.

Show comment
Hide comment
@tanc

tanc Sep 1, 2016

Contributor

I don't think the issue is with docker4drupal, its with docker for mac. There are numerous forum posts about the speed issues on the docker forums. The reality is that it'll take a long time to get a performant filesystem for docker for mac as the earlier link in this thread indicates.

Contributor

tanc commented Sep 1, 2016

I don't think the issue is with docker4drupal, its with docker for mac. There are numerous forum posts about the speed issues on the docker forums. The reality is that it'll take a long time to get a performant filesystem for docker for mac as the earlier link in this thread indicates.

@juanjol

This comment has been minimized.

Show comment
Hide comment
@juanjol

juanjol Sep 6, 2016

@fabianderijk @tanc Developers with OS X in my company are currently working with dinghy https://github.com/codekitchen/dinghy it's not perfect but it's faster than docker for mac, maybe you can give a try.

juanjol commented Sep 6, 2016

@fabianderijk @tanc Developers with OS X in my company are currently working with dinghy https://github.com/codekitchen/dinghy it's not perfect but it's faster than docker for mac, maybe you can give a try.

@csandanov

This comment has been minimized.

Show comment
Hide comment
@csandanov

csandanov Dec 20, 2016

Contributor

I've added instructions how to fix performance on macOS with the help of docker sync project http://docs.docker4drupal.org/en/latest/macos/

Contributor

csandanov commented Dec 20, 2016

I've added instructions how to fix performance on macOS with the help of docker sync project http://docs.docker4drupal.org/en/latest/macos/

@csandanov

This comment has been minimized.

Show comment
Hide comment
@csandanov

csandanov Mar 22, 2017

Contributor

Closing this issue due to no activity, the workaround via docker-sync has been presented. I know it's not ideal.

Contributor

csandanov commented Mar 22, 2017

Closing this issue due to no activity, the workaround via docker-sync has been presented. I know it's not ideal.

@csandanov csandanov closed this Mar 22, 2017

@netw3rker

This comment has been minimized.

Show comment
Hide comment
@netw3rker

netw3rker Jan 1, 2018

@csandanov might want to reopen this since "docker4drupal.org" has been domain squatted

@csandanov might want to reopen this since "docker4drupal.org" has been domain squatted

@artemkolotilkin

This comment has been minimized.

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