Run zookeeper datadir on tmpfs during testing

We may be experiencing iops performance issues resulting in unreliable
tests due to broken zookeeper connections. Run zookeeper under tmpfs to
mitigate this problem.

Other alternatives include using a system like eatmydata to make write
return early.

Change-Id: I8fbb3e243ae5974d243036b06c6b481872efffb3
This commit is contained in:
Clark Boylan 2018-10-23 10:31:58 -07:00
parent 4c5caf78a2
commit 9e2beeef5e
1 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,11 @@
# This setup needs to be run as a user that can run sudo.
TOOLSDIR=$(dirname $0)
# 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
# Be sure mysql and zookeeper are started.
sudo service mysql start
sudo service postgresql start