From fc2bb3f37f6505ea93b9fe024a60f31182335d7e Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Tue, 20 Dec 2016 14:42:26 +0000 Subject: [PATCH] Switch Ubuntu to overlay2 docker driver With 4.4 kernel we can use the improved overlay2 driver instead of btrfs for significantly better performance when creating layers. Change-Id: I0b84a2b34fdb71c07798d94b546d3105a2742321 Related-Id: I3b0dfd6db5298dfb34ec160eed910ca76feeb423 --- tools/setup_Debian.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/setup_Debian.sh b/tools/setup_Debian.sh index 2648684516..a07a83f771 100755 --- a/tools/setup_Debian.sh +++ b/tools/setup_Debian.sh @@ -57,11 +57,12 @@ source /etc/lsb-release echo "deb http://apt.dockerproject.org/repo ubuntu-${DISTRIB_CODENAME} main" | sudo tee /etc/apt/sources.list.d/docker.list add_key sudo apt-get update -sudo apt-get -y install --no-install-recommends docker-engine btrfs-tools +sudo apt-get -y install --no-install-recommends docker-engine sudo service docker stop -setup_disk if [[ ${DISTRIB_CODENAME} == "trusty" ]]; then + sudo apt-get -y install --no-install-recommends btrfs-tools + setup_disk echo 'DOCKER_OPTS="-s btrfs"' | sudo tee /etc/default/docker sudo mount --make-shared /run sudo service docker start @@ -70,7 +71,7 @@ else sudo tee /etc/systemd/system/docker.service.d/kolla.conf << EOF [Service] ExecStart= -ExecStart=/usr/bin/dockerd --storage-driver btrfs +ExecStart=/usr/bin/dockerd --storage-driver overlay2 MountFlags=shared EOF sudo systemctl daemon-reload