![]() You want to add:cached on the project_root volume in cli, like this: cli. Volumes: # Project root volume - project_root:/var/www:rw,cached I installed the latest edge release of Docker for Mac ( Version 17.06.0-rc1-ce-mac13 (18169)) to test this. Either I'm doing something wrong, or there is no difference. I'm running my standard test with time drush si -y (3 runs) and seeing no changes in the results regardless of the flag value. In June 2016 Docker announced Docker for Mac. The “new” way to run Docker on Mac with much easier installation and a more Linux-y experience for Docker users. Docker for Mac still starts a virtual machine (even though it is super hidden). It also brought its own hypervisor “hyperkit” and shared file system “osxfs”. I am on Docker for Mac, and with regards to PHP performance specifically, this has worked for me. With the standard php 7.1 php.ini, my laravel based application (in development/local environment) clocks a request with the laravel debug bar at around ~800ms. Without:cached real 0m58.845s real 0m58.577s real 1m5.246s With:cached real 1m6.226s real 1m7.792s real 1m1.457s. Mac vpn for dummies. Have you ever compared the container fs vs the native fs (running all natively on macOS - apache, mysql/fs, php fpm. I'm testing with a bunch of VMs (Linux, Mac and several Windows variations) running in VMware on my Mac. For day to day use I'm either on Docker for Mac or VirtualBox. Linux in VMware is as close to the native fs/etc. Performance on Mac as possible (or may even outperform Mac). The reason I'm not comparing with a native stack on Mac is due to the setup overhead. I could probably install MAMP, but for an apples to apples comparison that will still require adjustments to the settings to match them with what Docksal ships with. For me that's always been what pushes me away of dockerized alternatives Take a look at the Unison volumes option in Docksal: • • It provides the best possible fs performance you get get out of a Docker/virtualized setup. ![]() It does have some tradeoffs as well (like extra space usage and initial sync delay), but if performance is your biggest concerns, then it is your best bet. I'd be very interested to see how your native stack performance on Mac compares to the Unison option in Docksal, so please share your results if you decide to try it! A couple years ago, when docker was not yet that mainstream I set up a project-wise local environment with vagrant, debian and unison. It didn't go well, the management issues and different situations for each developer eventually made it not worth the time. But it's amazing that unison is still the solution for native performance on virtual boxes (whether virtual box or docker) at least on mac. I am unsure on the situation on Windows I'll give it a try at some point, and attempt to compare then and give you a shout on my findings.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |