Docker Community Forums

Share and learn in the Docker community.

File access in mounted volumes extremely slow, CPU bound


(Tom Keur) #235

Has anyone tested this out?

In the new beta release:

osxfs: switch to libev/kqueue to improve latency


(Alanbrent) #236

Performance for host:container shared volumes is just as bad is it’s ever been.


(Tom Keur) #237

I did some research myself;
One of my projects (Large PHP project with a lot of files):

d4m-nfs	1.60s
osxfs	4.93s

I loaded the homepage 10 times, and calculated the average loading time.

The problem is that I did not benched before the latest beta update, it feels alot faster then before.

Conclusion for now: I’m sticking with d4m-nfs.


(Cytopia) #238

Hasn’t improved with the latest beta.


(Joe Mewes) #239

Confirmed also on latest Docker Beta v1.12.3-beta30 (13798)

still testing using the original posted command:

time dd if=/dev/zero of=test.dat bs=1024 count=100000

direct on MacOS Sierra host :
real 0m1.756s
user 0m0.023s
sys 0m0.243s

Inside Docker Container /tmp dir :
real 0m0.522s
user 0m0.010s
sys 0m0.170s

Inside Docker Container Volume mount :
real 0m28.041s
user 0m0.170s
sys 0m2.030s

Basically the same as ever for this particular read/write issue I think.


(Mike Morley) #240

I am experiencing the same issue with docker mac 1.12.3-beta30.1 - brutally slow compared with docker machine on linux which we are using as the testing host. Its strange as it wasn’t too bad, and it does seem to vary. I have not been able to put a pattern to it as yet. Prior version seemed better than this one does though. I am in this case using neo4j database with database on volume.


(Olat) #241

I have been using Docker for Mac for development purpose for last 6 months with few hacks to avoid slow write to the mounted volume, but it was usable. I just upgraded to 1.12.3 stable and surprise, surprise, it is not possible to run any app, all the logging is slowing things down.

A.


(Ain Tohvri) #242

Same experience, terribly slow.

For me Docker for Mac was by far the slowest option.

I’ve wrapped up the numbers at http://tekkie.flashbit.net/devops/docker-performance-on-mac


(Adeb) #243

Also experiencing crippling slowness. I run a fairly large Magento site and its so slow its practically unusable for even development purposes.

I have tried using Unison and although I see some improvement its not enough to workaround these performance issues. I can’t see how docker for mac can be considered production ready with such a big issue that affects so many users.

Is there any official benchmarks on docker performance between the major host OS’s?

Very disappointing as I’ve no choice but to use an alternative approach, especially as there is no feedback from Docker on when these issues will be resolved.


(Fulcrum) #244

Please give https://github.com/IFSight/d4m-nfs a try. It is a wrapper to have volume mounted over NFS instead of osxfs.


(Savvopoulos) #245

Same issue here. Would appreciate some feedback on when this is going to be resolved.

I also tried d4m-nfs but couldn’t get it to work.


(Damau) #246

Myself and my colleagues are also pretty desperate to see a resolution. We are using docker for our local development environments and CI. We would rather not have to use external dependencies other than docker for mac as it would be a fairly large overhead for a new developer. Especially a junior one.

We are using d4m-nfs but don’t see it as a sustainable solution.

Good luck with it and hope you can solve it! We’ll have our fingers crossed.


(Fulcrum) #247

@damau I am hoping d4m-nfs is only a temporary work around, you are correct in saying it is not very sustainable. When there are changes to the Docker for Mac Moby VM we have had to tweak d4m-nfs and I believe currently it only works with the stable release not the current beta. It is odd to dream of the deprecation of software you have written :slight_smile:.


(Patakijv) #248

I am curious if those at Docker are considering incorporating the solution path in d4m-nfs or some other alternate solution to fix the performance issue. Is there a roadmap for a fix that will be built-in?


(Stéphan Kochen) #249

Here is an alternate approach, which modifies the ramdisk:


(Sandrodz) #250

gulp watch on mac is unbearable, I’ve tried everything, but its time to go back to native nodejs unfortunately.

for all other containers I use docker-sync which is a hassle but makes development bearable.


(Tonydillon) #251

Thank you so much @fulcrum

I implemented this yesterday and now have near native performance on the Mac. Docker Sync did not work for me.

Swapping out osxfs for nfs was the only thing that made any difference to performance for me.

All projects now run like a dream.

The only thing that concerns me is that this solution doesn’t work on the upcoming 1.13 release of Docker. Will d4m-nfs be updated to work with the new version of Docker? Are you able to expand on why it does not work and what steps need to be taken to update d4m-nfs?

Once again - many thanks for a great solution!

Tony


(phil swenson) #252

"The only thing that concerns me is that this solution doesn’t work on the upcoming 1.13 release of Docker. "

More concerning is docker has gone silent on this issue and there is no telling if this will ever be fixed.

Maybe tweeting docker directly might bring some attention to this issue? https://twitter.com/docker


(Matt Nuzzaco) #253

We’ve been struggling with osxfs speed issues since beta and I’ve started suggesting developers move over to native Linux. Docker for Mac is a nice idea but not usable if you’re developing in a container setup. The silence is not encouraging.


(Barat) #254

This fileshare thing is really annoying … I’ve tried docker-for-mac-nff by @stephank and d4m-nfs by @fulcrum and with my symfony project it’s still not working like it should (or maybe I made something wrong, but since I removed User folder from docker settings nfs mount works, because everything is mounting OK) …
I made a little test - without nfs my project even wont build (composer will fail), on nfs solutions pageload is really slow (7-15s), but when in Dockerfile i made a COPY of files into container (without mount) then pageload is ~1s (assigned 1 core and 6GB ram for docker) …
That’s on MBP13" early 2015 with i5 2.9GHz, M2 HDD and 16GB Ram …
I don’t now why even NFS is performing so bad … can I make some kind of test to be 100% sure that NFS is on place?