From 674d6d88b4f57dc3dd653817a0725f29502d21bf Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 23 Oct 2018 14:48:21 -0700 Subject: [PATCH] Run test zookeeper on top of tmpfs We have been running into what appear to be zookeeper performance issues causing tests to fail. Run the zookeeper on a tmpfs to reduce the impact of iops to disk. Other alternatives include using something like eatmydata to make writes and syncs fast but unsafe. Change-Id: Iea5e44af6844281c7f2078da57da9f13691e2642 --- tools/test-setup.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 tools/test-setup.sh diff --git a/tools/test-setup.sh b/tools/test-setup.sh new file mode 100755 index 000000000..092ea846a --- /dev/null +++ b/tools/test-setup.sh @@ -0,0 +1,13 @@ +#!/bin/bash -xe + +# This script will be run by OpenStack CI before unit tests are run, +# it sets up the test system as needed. +# Developers should setup their test systems in a similar way. + +# This setup needs to be run as a user that can run sudo. + +# Config Zookeeper to run on tmpfs +sudo service zookeeper stop +DATADIR=$(sed -n -e 's/^dataDir=//p' /etc/zookeeper/conf/zoo.cfg) +sudo mount -t tmpfs -o nodev,nosuid,size=500M none $DATADIR +sudo service zookeeper start