From aca6ac343e39e7fed3c2f5e0f6e3898461537567 Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Mon, 3 Mar 2014 15:28:04 +0000 Subject: [PATCH] qa: workunits: cephtool: test 'osd bench' limits Signed-off-by: Joao Eduardo Luis --- qa/workunits/cephtool/test.sh | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 4da5cd58aa13c..61219f79d8919 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -421,6 +421,8 @@ ceph osd pool get rbd crush_ruleset | grep 'crush_ruleset: 0' ceph osd thrash 10 + + set +e # expect error about missing 'pool' argument @@ -442,4 +444,43 @@ ceph heap dump ceph heap stop_profiler ceph heap release + +# test osd bench limits +# As we should not rely on defaults (as they may change over time), +# lets inject some values and perform some simple tests +# max iops: 10 # 100 IOPS +# max throughput: 10485760 # 10MB/s +# max block size: 2097152 # 2MB +# duration: 10 # 10 seconds + +ceph tell osd.0 injectargs "\ + --osd-bench-duration 10 \ + --osd-bench-max-block-size 2097152 \ + --osd-bench-large-size-max-throughput 10485760 \ + --osd-bench-small-size-max-iops 10" + +# anything with a bs larger than 2097152 must fail +expect_false ceph tell osd.0 bench 1 2097153 +# but using 'osd_bench_max_bs' must succeed +ceph tell osd.0 bench 1 2097152 + +# we assume 1MB as a large bs; anything lower is a small bs +# for a 4096 bytes bs, for 10 seconds, we are limited by IOPS +# max count: 409600 + +# more than max count must not be allowed +expect_false ceph tell osd.0 bench 409601 4096 +# but 409600 must be succeed +ceph tell osd.0 bench 409600 4096 + +# for a large bs, we are limited by throughput. +# for a 2MB block size for 10 seconds, out max count is 50 +# max count: 50 + +# more than max count must not be allowed +expect_false ceph tell osd.0 bench 51 2097152 +# but 50 must succeed +ceph tell osd.0 bench 50 2097152 + + echo OK -- 2.39.5