本文翻译自:What is the runtime performance cost of a Docker container?
I'd like to comprehensively understand the run-time performance cost of a Docker container. 我想全面了解Docker容器的运行时性能开销。 I've found references to networking anecdotally being ~100µs slower . 我发现网络的参考传闻速度慢了~100μs 。
I've also found references to the run-time cost being "negligible" and "close to zero" but I'd like to know more precisely what those costs are. 我还发现运行时成本的参考值“可以忽略不计”和“接近于零”,但我想更准确地了解这些成本是多少。 Ideally I'd like to know what Docker is abstracting with a performance cost and things that are abstracted without a performance cost. 理想情况下,我想知道Docker正在以性能成本和抽象的东西进行抽象而没有性能成本。 Networking, CPU, memory, etc. 网络,CPU,内存等
Furthermore, if there are abstraction costs, are there ways to get around the abstraction cost. 此外,如果存在抽象成本,是否有办法绕过抽象成本。 For example, perhaps I can mount a disk directly vs. virtually in Docker. 例如,也许我可以在Docker中直接安装磁盘。
#1楼
参考:https://stackoom.com/question/1TqLF/Docker容器的运行时性能成本是多少
#2楼
Docker isn't virtualization, as such -- instead, it's an abstraction on top of the kernel's support for different process namespaces, device namespaces, etc.; Docker不是虚拟化的 - 相反,它是内核对不同进程命名空间,设备命名空间等的支持的抽象; one namespace isn't inherently more expensive or ineffici