# Extremely slow parallel docker builds

**URL:** <https://forums.docker.com/t/extremely-slow-parallel-docker-builds/38587>\
**Category:** General\
**Tags:** build\
**Created:** [September 22, 2017, 9:11am UTC](https://forums.docker.com/t/extremely-slow-parallel-docker-builds/38587 "2017-09-22T09:11:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicolasr69](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@nicolasr69](https://forums.docker.com/u/nicolasr69)\
**Post date:** [September 22, 2017, 9:11am UTC](https://forums.docker.com/t/extremely-slow-parallel-docker-builds/38587/1 "2017-09-22T09:11:38Z")

</div>

Hello,

I tried to run 4 _docker build_ commands at the same time on my server and none of them ended within hours (5+) while they usually take up to 15 minutes to complete…

My configuration is as follow:

- Ubuntu 14.04 server
- Docker version:

> Client:  
> Version: 17.07.0-ce  
> API version: 1.31  
> Go version: go1.8.3  
> Git commit: 8784753  
> Built: Tue Aug 29 17:43:06 2017  
> OS/Arch: linux/amd64  
> Server:  
> Version: 17.07.0-ce  
> API version: 1.31 (minimum version 1.12)  
> Go version: go1.8.3  
> Git commit: 8784753  
> Built: Tue Aug 29 17:41:57 2017  
> OS/Arch: linux/amd64  
> Experimental: false

Is it a known issue ? Or just my configuration which is bad 🙂 ?

Thanks in advance for your help,

PS: is the category correct ? I did not found “Docker for Ubuntu/Linux”

Cheers,  
Nicolas

---

<div class="post-metadata">

**Author:** ![think](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/think/32/14641_2.png) [@think](https://forums.docker.com/u/think)\
**Post date:** [September 22, 2017, 12:05pm UTC](https://forums.docker.com/t/extremely-slow-parallel-docker-builds/38587/2 "2017-09-22T12:05:59Z")

</div>

is it slow on [http://play-with-docker.com](http://play-with-docker.com) as well?  
If so its either Docker or your Dockerfile. If not it’s your configuration. 🙂

---

<div class="post-metadata">

**Author:** ![nicolasr69](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@nicolasr69](https://forums.docker.com/u/nicolasr69)\
**Post date:** [September 27, 2017, 9:36am UTC](https://forums.docker.com/t/extremely-slow-parallel-docker-builds/38587/3 "2017-09-27T09:36:34Z")

</div>

Hello think,

Thank you for your reply, but not it is not slow there.

After some Googlings, I found out that Docker on Ubuntu 14.04 can use **devicemapper** as a file storage system, which is deprecated (cf [https://docs.docker.com/engine/userguide/storagedriver/aufs-driver](https://docs.docker.com/engine/userguide/storagedriver/aufs-driver)). This can be the reason of this very high latency.

To use the recommended AUFS instead, I need to run:  
`$ sudo apt-get install linux-image-extra-$(uname -r)`  
But it did not work!  
I think it was because the Kernel I was using is 3.13.0-132-generic, which might be too old, so I forced it to 3.19.0-18-generic.

Now I have, in the docker info:  
`$ docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 17.09.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 0
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
apparmor
Kernel Version: 3.19.0-18-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.02GiB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false`

WARNING: No swap limit support

Let’s hope it solves the issue ! 🙂

---

<div class="post-metadata">

**Author:** ![nicolasr69](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@nicolasr69](https://forums.docker.com/u/nicolasr69)\
**Post date:** [September 27, 2017, 11:52am UTC](https://forums.docker.com/t/extremely-slow-parallel-docker-builds/38587/4 "2017-09-27T11:52:21Z")

</div>

I installed Kernel **linux-generic-lts-vivid** as I got some troubles running docker build with the 3.19.0-18.
