Performance: enable thin provision for lvm

Currently lvm type as default which is treated as non thin provision.
So it will use dd without sparse to copy data for clone lvm. It will
occupy much disk space and also consumes much cpu/io resource. But
actually in our CI env, thin provision is supported. Let's enable
this feature to get better performance.

Change-Id: I9b747f212780a90551d79924190989728d47ffe3
This commit is contained in:
Jianghua Wang 2016-08-23 15:00:07 +08:00
parent a36e1dfadd
commit f70b0b535c

View File

@ -113,10 +113,10 @@ PUBNET=$(run_in_domzero xe network-create name-label=pubnet </dev/null)
PUBVIF=$(run_in_domzero xe vif-create vm-uuid=$APP network-uuid=$PUBNET device=4 </dev/null)
run_in_domzero xe vif-plug uuid=$PUBVIF </dev/null
if [ "$DEVSTACK_GATE_NEUTRON" -eq "1" ]; then
# Set to keep localrc file as we will config localrc during pre_test_hook
export KEEP_LOCALRC=1
# Set to keep localrc file as we will config localrc during pre_test_hook
export KEEP_LOCALRC=1
if [ "$DEVSTACK_GATE_NEUTRON" -eq "1" ]; then
# Create integration network for compute node
INTNET=$(run_in_domzero xe network-create name-label=intnet </dev/null)
export INTBRIDGE=$(run_in_domzero xe network-param-get param-name=bridge uuid=$INTNET </dev/null)
@ -196,6 +196,17 @@ CRONTAB
} | run_in_domzero
)
# Use thin provision for lvm, so that we can save disk space and avoid large disk IO requests
# during volume tests.
(
localconf="/opt/stack/new/devstack/local.conf"
cat <<EOF >>"$localconf"
[[post-config|/etc/cinder/cinder.conf]]
[lvmdriver-1]
lvm_type = thin
EOF
)
## config interface and localrc for neutron network
(
if [ "$DEVSTACK_GATE_NEUTRON" -eq "1" ]; then