brikis98 / docker-osx-dev

A productive development environment with Docker on OS X
http://www.ybrikman.com/writing/2015/05/19/docker-osx-dev/
MIT License
1.43k stars 106 forks source link

OS X Docker Beta compatibility #191

Open rmtsrc opened 8 years ago

rmtsrc commented 8 years ago

Are there any plans to update this to work with the new OS X Docker Beta?

As I'm running into the same issue where shared OS X volumes/mounts having slow file I/O and watch scripts don't work unless they are set to poll all of the files 😞

brikis98 commented 8 years ago

I haven't had a chance to use Docker Beta yet. Isn't it using something other than VirtualBox as the VM? If so, does that VM still have the same issues with volume mounting performance and file watchers not working?

ain commented 8 years ago

@brikis98 Docker for Mac runs on xhyve and osxfs. Its native performance was nowhere near vboxfs when I tested it at Beta 9. I might test again with the latest.

brikis98 commented 8 years ago

Wait, so it's even slower than vboxfs? That's quite an accomplishment :)

If anyone has it installed and can do a mini benchmark comparing native file system performance versus a volume mounted with Docker for Mac, that would be very helpful. I had been hoping the Docker apps would remove the need for docker-osx-dev, but if those apps are still unusable, then we'll have to update this script to work with them.

ain commented 8 years ago

Yes, it was at the stage of Beta 9. I tested it with one of our not-so-loaded RoR apps where we don't use docker-osx-dev, because the speed is fine. You could notice the speed difference without benchmark, but it's also backed up by the guys who have actually benchmarked it.

The thing is though, that on xhyve they can improve significantly and I know they're after the performance. I'd actually expect the latest beta to be better than vboxfs already.

brikis98 commented 8 years ago

Ah, OK. Well, if you've got a chance to benchmark the latest version, let me know how it works for you.

gcstang commented 8 years ago

This is from one of the forum issues.

https://forums.docker.com/t/file-access-in-mounted-volumes-extremely-slow-cpu-bound/8076/69

Docker for Mac: version: v1.11.1-beta14.5.m OS X: version 10.11.1 (build: 15B42) logs: /tmp/20160607-093828.tar.gz failure: No error was detected

--- local root@9e5d52471dc9:/tmp# dd if=/dev/zero of=test.dat bs=1024 count=100000 100000+0 records in 100000+0 records out 102400000 bytes (102 MB) copied, 0.49442 s, 207 MB/s

--- mounted root@9e5d52471dc9:/mounted/folder# dd if=/dev/zero of=test.dat bs=1024 count=100000 100000+0 records in 100000+0 records out 102400000 bytes (102 MB) copied, 39.3927 s, 2.6 MB/s

brikis98 commented 8 years ago

@gcstang Thanks for the link. Sounds like the perf problems are pretty severe, but the Docker team is working on it:

Just an update here from the Docker camp... We're still working on it! We've added some small performance boosts over the last few Beta's and performance is heading in the right direction. There are a few other fixes that should be heading in over the next few betas that will also provide a decent boost. The target is to be much faster than VirtualBox and we're confident we can do this before release.

Looks like Beta13 made some significant leaps, though it's still painfully slow. Hopefully, future version will keep getting better and better, though I find it odd that they would release these "native" apps in what I would consider a totally unusable state...

gcstang commented 8 years ago

Agreed, they said the release yesterday was an RC 2 instead of beta ... hope they're still working on it.

On Tue, Jun 21, 2016 at 11:15 AM, Yevgeniy Brikman <notifications@github.com

wrote:

@gcstang https://github.com/gcstang Thanks for the link. Sounds like the perf problems are pretty severe, but the Docker team is working on it:

Just an update here from the Docker camp... We're still working on it! We've added some small performance boosts over the last few Beta's and performance is heading in the right direction. There are a few other fixes that should be heading in over the next few betas that will also provide a decent boost. The target is to be much faster than VirtualBox and we're confident we can do this before release.

Looks like Beta13 made some significant leaps, though it's still painfully slow. Hopefully, future version will keep getting better and better, though I find it odd that they would release these "native" apps in what I would consider a totally unusable state...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/brikis98/docker-osx-dev/issues/191#issuecomment-227491574, or mute the thread https://github.com/notifications/unsubscribe/ADBkKQ5Qdt9j-PEOknsg22NkixVIpW1Hks5qOA46gaJpZM4I0S-y .

wamatt commented 8 years ago

I suspect it could be a long time before we see decent performance from Docker for Mac. Watching this thread in case anyone gets docker-osx-dev running on D4M.

Simperfit commented 8 years ago

As far as I can see, it works better with the beta16.

rmtsrc commented 8 years ago

Since Mac Docker now has a public beta I thought I'd try rebenchmarking. Here's my results, I guess I'll stick with docker-osx-dev for now.

Mac benchmark (without Docker)

dd if=/dev/zero of=/tmp/output bs=8k count=100k; rm -f /tmp/output
102400+0 records in
102400+0 records out
838860800 bytes transferred in 1.132447 secs (740750602 bytes/sec)

docker-osx-dev (revision ea0617d)

dd if=/dev/zero of=/usr/src/app/output bs=8k count=100k; rm -f /usr/src/app/output
app_1  | 102400+0 records in
app_1  | 102400+0 records out
app_1  | 838860800 bytes (839 MB) copied, 0.261691 s, 3.2 GB/s

Dinghy Docker over NFS (4.4.1)

dd if=/dev/zero of=/usr/src/app/output bs=8k count=100k; rm -f /usr/src/app/output
app_1  | 102400+0 records in
app_1  | 102400+0 records out
app_1  | 838860800 bytes (839 MB) copied, 26.5691 s, 31.6 MB/s

Mac Docker Public Beta (1.12.0-rc2-beta17 build: 9779)

dd if=/dev/zero of=/usr/src/app/output bs=8k count=100k; rm -f /usr/src/app/output
app_1  | 102400+0 records in
app_1  | 102400+0 records out
app_1  | 838860800 bytes (839 MB) copied, 34.3933 s, 24.4 MB/s
ain commented 7 years ago

The above also matches my benchmark. Details at http://tekkie.flashbit.net/devops/docker-performance-on-mac