From: Jamie Pryde Date: Fri, 23 Aug 2024 20:53:41 +0000 (+0000) Subject: test/erasure-code: increase ceph_erasure_code_benchmark default buffer size X-Git-Tag: testing/wip-pdonnell-testing-20241106.142118-debug~22^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a09fd4210b1caaa9276c692158ad7f91d31fce86;p=ceph-ci.git test/erasure-code: increase ceph_erasure_code_benchmark default buffer size Signed-off-by: Jamie Pryde --- diff --git a/qa/workunits/erasure-code/bench.sh b/qa/workunits/erasure-code/bench.sh index fc75830dfd0..87e997c3500 100755 --- a/qa/workunits/erasure-code/bench.sh +++ b/qa/workunits/erasure-code/bench.sh @@ -17,7 +17,8 @@ # # Test that it works from sources with: # -# CEPH_ERASURE_CODE_BENCHMARK=src/ceph_erasure_code_benchmark \ +# TOTAL_SIZE=$((4 * 1024 * 1024)) SIZE=4096 \ +# CEPH_ERASURE_CODE_BENCHMARK=build/bin/ceph_erasure_code_benchmark \ # PLUGIN_DIRECTORY=build/lib \ # qa/workunits/erasure-code/bench.sh fplot jerasure | # tee qa/workunits/erasure-code/bench.js @@ -34,10 +35,14 @@ # firefox qa/workunits/erasure-code/bench.html # # Once it is confirmed to work, it can be run with a more significant -# volume of data so that the measures are more reliable: +# volume of data so that the measures are more reliable. Ideally the size +# of the buffers (SIZE) should be larger than the L3 cache to avoid cache hits. +# The following example uses an 80MB (80 * 1024 * 1024) buffer. +# A larger buffer with fewer iterations (iterations = TOTAL SIZE / SIZE) should result in +# more time spent encoding/decoding and less time allocating/aligning buffers: # -# TOTAL_SIZE=$((4 * 1024 * 1024 * 1024)) \ -# CEPH_ERASURE_CODE_BENCHMARK=src/ceph_erasure_code_benchmark \ +# TOTAL_SIZE=$((100 * 80 * 1024 * 1024)) SIZE=$((80 * 1024 * 1024)) \ +# CEPH_ERASURE_CODE_BENCHMARK=build/bin/ceph_erasure_code_benchmark \ # PLUGIN_DIRECTORY=build/lib \ # qa/workunits/erasure-code/bench.sh fplot jerasure | # tee qa/workunits/erasure-code/bench.js @@ -51,8 +56,8 @@ export PATH=/sbin:$PATH : ${PLUGIN_DIRECTORY:=/usr/lib/ceph/erasure-code} : ${PLUGINS:=isa jerasure} : ${TECHNIQUES:=vandermonde cauchy liberation reed_sol_r6_op blaum_roth liber8tion} -: ${TOTAL_SIZE:=$((1024 * 1024))} -: ${SIZE:=4096} +: ${TOTAL_SIZE:=$((100 * 80 * 1024 * 1024))} #TOTAL_SIZE / SIZE = number of encode or decode iterations to run +: ${SIZE:=$((80 * 1024 * 1024))} #size of buffer to encode/decode : ${PARAMETERS:=--parameter jerasure-per-chunk-alignment=true} declare -rA isa_techniques=( diff --git a/src/test/erasure-code/ceph_erasure_code_benchmark.cc b/src/test/erasure-code/ceph_erasure_code_benchmark.cc index c86e58697c0..00054bf4784 100644 --- a/src/test/erasure-code/ceph_erasure_code_benchmark.cc +++ b/src/test/erasure-code/ceph_erasure_code_benchmark.cc @@ -52,9 +52,9 @@ int ErasureCodeBench::setup(int argc, char** argv) { desc.add_options() ("help,h", "produce help message") ("verbose,v", "explain what happens") - ("size,s", po::value()->default_value(1024 * 1024), + ("size,s", po::value()->default_value(80 * 1024 * 1024), "size of the buffer to be encoded") - ("iterations,i", po::value()->default_value(1), + ("iterations,i", po::value()->default_value(100), "number of encode/decode runs") ("plugin,p", po::value()->default_value("jerasure"), "erasure code plugin name")