HACKER Q&A
📣 systemvoltage

What are the performance costs of Docker?


I am really curious since the world appears to run on Docker and yet, there isn't much information out there. May be I am bad at searching, there is a ton of blog spam. Google search yields the top SO answer: https://stackoverflow.com/questions/21889053/what-is-the-runtime-performance-cost-of-a-docker-container

Which references a really old IBM paper: http://domino.research.ibm.com/library/cyberdig.nsf/papers/0929052195DD819C85257D2300681E7B/$File/rc25482.pdf

I would have thought since millions of developers use Docker, there must be hundreds if not thousands of high quality benchmarking results and optimization discussion for dockerized workloads and how they compare with native performance. Why aren't companies and developers not interested in benchmarking Docker? And how come we never talk about it too much on HN?

Google Image search yields a few more graphs, one of which led me to this article: https://www.scylladb.com/2018/08/09/cost-containerization-scylla/

Performance impact straight out of box seems significant.

Ofcourse, with any performance discussion, there is always "take results with a grain of salt" and flaws in benchmarking process. But, I am just generally curious about the following:

1) Has your company conducted docker performance tests with your specific work load?

2) If yes, what is the performance hit approximately?

3) If no, is it because AWS/cloud resources are cheap and it is not worth the time or is that no one questions it?

4) Is the ease of development preferred vs. cost of performance in terms of ROI?

Thank you.

PS - Does your company not use Docker? Why? Would love to hear that.


  👤 tus666 Accepted Answer ✓
Docker is not a virtual machine.

It's basically chroot.

And what do you think the performance impact of chroot is? Not much.

About the only significant impact would be on networking - which is often virtualized in docker (especially k8s). However as external I/O is orders of magnitude slower than how fast things happen inside a CPU this would rarely matter.


👤 nikau
I've haven't worked anywhere where Docker runtime is used outside local development machines - container images are run on one of the 10+ various container services each cloud provider have.

Secondly the performance hit of running containers doesn't factor into any decision making - its all around self sufficiency and agility of running in the cloud vs dealing with corporate on-prem that can take weeks or months to provision things.


👤 hindsightbias
Clouds aren’t really cheap but docker commoditizes hardware to the point the money counters don’t care about productivity. opex over capex.

As the curve trends down with Moore’s and bloatware bloats, these virtualization schemes will crush millions of souls. Spinning beachballs will be fond memories by comparison.