instruction to improve d4m speed (#597)

* instruction to improve d4m speed

* Move mac speed doc to misc section, remove docker-sync instructions
This commit is contained in:
Simon Perdrisat 2017-02-10 14:11:24 +01:00 committed by Philippe Trépanier
parent 00550d328c
commit f333982598
1 changed files with 31 additions and 4 deletions

View File

@ -96,6 +96,7 @@ LaraDock is configured to run Laravel Apps by default, and it can be modified to
- [PHPStorm Debugging Guide](#phpstorm-debugging)
- [Keep track of your LaraDock changes](#keep-tracking-LaraDock)
- [Upgrading LaraDock](#upgrading-laradock)
- [Improve speed on MacOS](#Speed-MacOS)
- [Common Problems](#Common-Problems)
- [Related Projects](#related-projects)
- [Help & Questions](#Help)
@ -377,10 +378,6 @@ Do the same for each project `project2.conf`, `project3.conf`,...
7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.
<a name="Usage"></a>
## Usage
@ -1755,8 +1752,38 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ
"Warning Containers Data might be lost!"
<a name="Speed-MacOS"></a>
### Improve speed on MacOS
Sharing code into Docker containers with osxfs have very poor performance compared to Linux. You can get around this issue by using NFS to share your files betwen your host and your container.
#### How to share files using NFS (d4m-nfs)
[d4m-nfs](https://github.com/IFSight/d4m-nfs) automatically mount NFS volume instead of osxfs one.
1. Update docker File Sharing preferences. You should have only /tmp.
2. Restart docker.
3. Clone d4m-nfs repository in your home directory
```bash
$ git clone https://github.com/IFSight/d4m-nfs ~/d4m-nfs
```
4. Edit/create the file ~/d4m-nfs/etc/d4m-nfs-mounts.txt with this configuration:
```
/Users:/Users
/Volumes:/Volumes
/private:/private
```
5. Empty the file /etc/exports and clean it up if required (there may be collisions if you come from Vagrant or if you already executed the d4m-nfs.sh script)
6. Run the d4m-nfs.sh script
```bash
~/d4m-nfs/d4m-nfs.sh
```
That's it! Now you just have to bring your container up with docker compose. For example:
```bash
docker-compose up -d nginx mysql
```
<br>