]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-docker-prs: Moving image{s} directories to shm evelu-shm 668/head
authorErwan Velu <erwan@redhat.com>
Tue, 28 Mar 2017 14:18:41 +0000 (16:18 +0200)
committerErwan Velu <erwan@redhat.com>
Tue, 28 Mar 2017 14:18:41 +0000 (16:18 +0200)
On the CI, the root disk is pretty slow (20-30MB/sec).
This patch is about moving the big directories into /dev/shm to speedup the builds.
We can count up to 7GB of storage that doesn't it the cold storage but RAM (~9000MB/sec).

ceph-docker-prs/build/build

index 5a88bf1b16c7f4271c7cf4d83463cf14d8085280..db1f7b1b7f062406f1be9a4164d0b30fb40b5129 100644 (file)
@@ -15,6 +15,17 @@ sudo gpasswd -a ${USER} docker
 sudo systemctl restart docker
 newgrp docker
 
+# Moving docker/image & libvirt/images to shm to speedup CI
+if [ ! -e /dev/shm/images ]; then
+  sudo mv /var/lib/libvirt/images /dev/shm/
+  sudo ln -sf /dev/shm/images /var/lib/libvirt/
+fi
+
+if [ ! -e /dev/shm/image ]; then
+  sudo mv /var/lib/docker/image /dev/shm
+  sudo ln -sf /dev/shm/image /var/lib/docker/
+fi
+
 # adding groups on the fly doesn't guarantee their availability
 # so we must use `sg` to execute the tests as part of the docker group to avoid
 # 'Permission Denied` when tryin to talk over the socket