Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

does parallel image extraction with pigz work in docker?

Tags:

docker

According to this pull request https://github.com/moby/moby/pull/35697, docker should be able to perform parallel image layer extraction using unpigz

But I noticed, and as Jackson Delahunt (@sabrehagen) points out in his comment (https://github.com/moby/moby/issues/21814#issuecomment-445097337), this doesn't appear to work.

`docker image pull

To debug, I ran my docker daemon in the foreground with --debug and scanned for the error message that would appear if docker was unable to find my unpigz binary ("unpigz binary not found in PATH, falling back to go gzip library"), but this message was not logged as I was pulling various multi-layer images from dockerhub.

Am I misunderstanding this feature, or am I not using it correctly? Any debugging tips would also be appreciated.

like image 670
Stephen Crosby Avatar asked Sep 05 '25 02:09

Stephen Crosby


1 Answers

In this case the parallelism is multi-threaded per layer, not multiple layers at once.
Layers are still extracting serially. What unpigz helps with is extracting a layer using multiple threads (unlike gunzip) to take advantage of multiple vCPUs.

like image 113
Gili Nachum Avatar answered Sep 08 '25 00:09

Gili Nachum