Commit bb47621f authored by Klaus Aehlig's avatar Klaus Aehlig

Add basic test for CPU speed

In this example, the cluster has two nodes and four instances, two with
primary on each of the nodes. The most scarce resource on this cluster
are (virtual) CPUs and the second node has 3 times the CPU speed of the
first one. So distributing the instances 1 and 3 gives a more balanced
cluster.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent b366d732
...@@ -1365,6 +1365,7 @@ TEST_FILES = \ ...@@ -1365,6 +1365,7 @@ TEST_FILES = \
test/data/htools/hail-invalid-reloc.json \ test/data/htools/hail-invalid-reloc.json \
test/data/htools/hail-node-evac.json \ test/data/htools/hail-node-evac.json \
test/data/htools/hail-reloc-drbd.json \ test/data/htools/hail-reloc-drbd.json \
test/data/htools/hbal-cpu-speed.data \
test/data/htools/hbal-dyn.data \ test/data/htools/hbal-dyn.data \
test/data/htools/hbal-excl-tags.data \ test/data/htools/hbal-excl-tags.data \
test/data/htools/hbal-split-insts.data \ test/data/htools/hbal-split-insts.data \
......
group-01|fake-uuid-01|preferred||
node-slow|1600|0|1400|100000|96000|8|M|fake-uuid-01|8||N|8|1|1.0
node-fast|1600|0|1400|100000|96000|8|N|fake-uuid-01|8||N|8|1|3.0
inst1|100|1000|8|running|Y|node-slow|node-fast|drbd|
inst2|100|1000|8|running|Y|node-slow|node-fast|drbd|
inst3|100|1000|8|running|Y|node-fast|node-slow|drbd|
inst4|100|1000|8|running|Y|node-fast|node-slow|drbd|
...@@ -137,3 +137,8 @@ diff -u $T/simu-rebal-merged.tiered $T/simu-rebal.tiered.original ...@@ -137,3 +137,8 @@ diff -u $T/simu-rebal-merged.tiered $T/simu-rebal.tiered.original
./test/hs/hbal -t$TESTDATA_DIR/hbal-dyn.data --ignore-dynu ./test/hs/hbal -t$TESTDATA_DIR/hbal-dyn.data --ignore-dynu
>>>/Cluster is already well balanced/ >>>/Cluster is already well balanced/
>>>=0 >>>=0
# Test CPU speed is taken into account
./test/hs/hbal -t$TESTDATA_DIR/hbal-cpu-speed.data --ignore-dynu
>>>/inst[12] node-slow:node-fast => node-fast:node-slow/
>>>=0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment