nodepool/tools/test-setup.sh
Clark Boylan 674d6d88b4 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
2018-10-24 08:36:18 -07:00

14 lines
467 B
Bash
Executable File

#!/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