Docker Community Forums

Share and learn in the Docker community.

Docker commit is quite slow on large images

(Philz) #1

I’m running “Docker version 1.13.1, build 092cba3” from the package on Ubuntu, versioned 1.13.1-0ubuntu1~16.04.2.

If I create a 50GB container and try to commit it, it takes 2.5 minutes to create it, but ten minutes to commit it. During that time, a CPU is pegged in the docker process.

Do folks have any suggestions on improving commit speed? In my use case, my image is actually about 100GB, and I don’t need to push it anywhere. I do, however, want to create several containers based on that image.


$time docker run --name z1 ubuntu:16.04 dd if=/dev/zero of=/tmp/zz count=50M bs=1024; time docker commit z1 z2; docker rm z1; docker rmi z2
52428800+0 records in
52428800+0 records out
53687091200 bytes (54 GB, 50 GiB) copied, 156.706 s, 343 MB/s

real    2m37.166s
user    0m0.032s
sys     0m0.004s

real    10m9.495s
user    0m0.004s
sys     0m0.008s
Untagged: z2:latest
Deleted: sha256:8a85e342fd044158d957a7374ab461a393696018e26c6cd109acd861f61d2175
Deleted: sha256:669b35c316e7e78cbf066808c82c2084ba4e13548d99f01971839ace7f71e7f2