3 ms·
The perplexing thing to me about this paper is that "containers" are launched merely through a particular type of clone(2) semantics (and clone(2) implements fo
by otterley 9y ago
The perplexing thing to me about this paper is that "containers" are launched merely through a particular type of clone(2) semantics (and clone(2) implements fork(2) under the hood on Linux). So the process of launching a new container should take around the same time as it takes to perform a fork. The fact that it doesn't in their analysis is surprising.
So the question for me is, what is the paper measuring, exactly, when they talk about Docker's relative performance? Are they including Docker API overhead in their instrumentation? If so, that sounds like an apples-to-oranges comparison.
- fpoling 9y agoTo start a container Docker does a lot of expensive setup like preparing network stack, volumes, logging etc. One can trivially see how expensive is that just by timing the command line and dropping expensive Docker options. On my laptop: $ time docker run --rm ubuntu true real 0m0.641s user 0m0.036s sys 0m0.018s $ time docker run --rm --net none --log-driver none --read-only ubuntu true real 0m0.399s user 0m0.039s sys 0m0.018s Compare that with the unshare utility that one can use as a Docker replacement for simple containers (options create all new namespaces that the utility supports including user namespaces): $ time unshare -m -u -i -n -p -U -C -f -r /bin/true real 0m0.029s user 0m0.001s sys 0m0.009s
- jsjohnst 9y agoHave you ever straced a Docker run or investigated what it does on container startup? I recommend doing so if not!