La construcción de Docker tarda demasiado

Ciertas instrucciones en mis files Docker tardan demasiado. Por ejemplo, agregar un file de 3 líneas con la instrucción ADD o hacer eco de una línea en un file a veces lleva más de un minuto.

¿Qué puede estar causando esto?

Aquí está mi syslog, no estoy seguro si es relevante:

 May 29 18:45:17 mymachine kernel: [97813.649053] EXT4-fs (dm-3): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:45:54 mymachine kernel: [97850.627286] EXT4-fs (dm-3): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:45:55 mymachine kernel: [97851.249484] EXT4-fs (dm-4): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:46:34 mymachine console-kit-daemon[983]: GLib-CRITICAL: Source ID 5102 was not found when attempting to remove it May 29 18:46:53 mymachine kernel: [97908.977215] EXT4-fs (dm-2): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:46:53 mymachine kernel: [97909.217137] EXT4-fs (dm-2): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:46:53 mymachine kernel: [97909.247252] EXT4-fs (dm-3): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:47:26 mymachine kernel: [97942.607378] EXT4-fs (dm-3): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:47:26 mymachine kernel: [97942.767831] EXT4-fs (dm-4): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:48:36 mymachine kernel: [98012.632630] EXT4-fs (dm-2): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:48:37 mymachine kernel: [98013.681835] EXT4-fs (dm-2): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:48:38 mymachine kernel: [98014.009612] netlink: 1 bytes leftover after parsing attributes. May 29 18:48:38 mymachine kernel: [98014.016816] device vethb49f entenetworking promiscuous mode May 29 18:48:38 mymachine kernel: [98014.020408] IPv6: ADDRCONF(NETDEV_UP): vethb49f: link is not ready May 29 18:48:38 mymachine kernel: [98014.046745] IPv6: ADDRCONF(NETDEV_CHANGE): vethb49f: link becomes ready May 29 18:48:38 mymachine kernel: [98014.046785] docker0: port 2(vethb49f) entenetworking forwarding state May 29 18:48:38 mymachine kernel: [98014.046791] docker0: port 2(vethb49f) entenetworking forwarding state May 29 18:48:39 mymachine kernel: [98015.128850] EXT4-fs (dm-3): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:48:39 mymachine kernel: [98015.174370] docker0: port 2(vethb49f) entenetworking disabled state May 29 18:48:39 mymachine kernel: [98015.174860] device vethb49f left promiscuous mode May 29 18:48:39 mymachine kernel: [98015.174867] docker0: port 2(vethb49f) entenetworking disabled state May 29 18:49:18 mymachine kernel: [98054.703978] EXT4-fs (dm-3): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:49:18 mymachine kernel: [98054.834326] EXT4-fs (dm-4): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:50:14 mymachine kernel: [98110.408736] EXT4-fs (dm-2): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:50:15 mymachine kernel: [98111.221056] EXT4-fs (dm-2): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:50:15 mymachine kernel: [98111.443577] EXT4-fs (dm-3): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:50:44 mymachine kernel: [98140.675447] EXT4-fs (dm-3): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:50:44 mymachine kernel: [98140.695348] EXT4-fs (dm-4): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:51:36 mymachine kernel: [98192.027431] EXT4-fs (dm-2): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:51:36 mymachine kernel: [98192.559271] EXT4-fs (dm-2): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:51:36 mymachine kernel: [98192.800718] netlink: 1 bytes leftover after parsing attributes. May 29 18:51:36 mymachine kernel: [98192.881484] device veth000f entenetworking promiscuous mode May 29 18:51:36 mymachine kernel: [98192.881966] IPv6: ADDRCONF(NETDEV_UP): veth000f: link is not ready May 29 18:51:36 mymachine kernel: [98192.945999] IPv6: ADDRCONF(NETDEV_CHANGE): veth000f: link becomes ready May 29 18:51:36 mymachine kernel: [98192.946045] docker0: port 2(veth000f) entenetworking forwarding state May 29 18:51:36 mymachine kernel: [98192.946051] docker0: port 2(veth000f) entenetworking forwarding state May 29 18:51:37 mymachine kernel: [98193.274007] docker0: port 2(veth000f) entenetworking disabled state May 29 18:51:37 mymachine kernel: [98193.275061] device veth000f left promiscuous mode May 29 18:51:37 mymachine kernel: [98193.275068] docker0: port 2(veth000f) entenetworking disabled state May 29 18:51:37 mymachine kernel: [98193.319695] EXT4-fs (dm-3): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:52:17 mymachine kernel: [98233.520926] EXT4-fs (dm-3): mounted filesystem with ordenetworking data mode. Opts: discard May 29 18:52:17 mymachine kernel: [98233.608787] EXT4-fs (dm-4): mounted filesystem with ordenetworking data mode. Opts: discard 

Información de Docker:

 Containers: 2 Images: 172 Storage Driver: devicemapper Pool Name: docker-202:1-1447309-pool Data file: /var/lib/docker/devicemapper/devicemapper/data Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata Data Space Used: 4443.4 Mb Data Space Total: 102400.0 Mb Metadata Space Used: 9.4 Mb Metadata Space Total: 2048.0 Mb Execution Driver: native-0.2 Kernel Version: 3.13.0-24-generic WARNING: No swap limit support 

¿Qué backend de Docker estás ejecutando? ¿AUFS? dispositivo-mapeador? btrfs? …?

El cambio al backend AUFS, si su sistema operativo lo admite, es probable que sea útil aquí.

Una respuesta más autorizada requeriría saber qué back-end está utilizando, las características de performance del sistema en el que se encuentra, y tal vez un rastro de su invocación (como lo que sysdig puede generar).