New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osd: erasure code benchmark tool #933
Conversation
@apeters1971 I would very much appreciate your review when you get time |
This looks already very good. I would add also add the option to additionally measure the decoding performance when data stripes are unavailable and evt. beautify the output a little bit - e.g. print key-value pairs with input and output parameters e.g. also compute something human readable like MB/s ?!?! I would consider the option to have the bufferlist allocated in individual chunks and see the impact of the performance. I don't know if in the final usage in CEPH there will be one big buffer allocated and segemented or each piece will have its own allocation ... in the SNAPRAID sources there is this remark:
I don't know your exact plans, but it would be also very useful to wrap the command with some scripting language printing the platform you run, memory and maybe run each command like this and some standard test parameters ?!?!? perf stat /usr/bin/time -v ceph_erasure_code_benchmark .... |
Thanks for the quick feedback. I'll work on it today :-) |
@apeters1971 I've added decode + inserting erasure as you suggested. |
@apeters1971 be8cfc9 is the implementation of the benchmark workunit based on ceph_erasure_code_benchmark |
@apeters1971 I was able to find performance problems in the example ( I know it does not matter really but ... ;-). I was also able to confirm that jerasure performances as reported by ceph_erasure_code_benchmark are the same as the one you can get from the decoder/encoder examples found in Jerasure itself. This is a good sign that the tool works and that the plugin implementation does not introduce any significant performance problem. Although I could work on a teuthology job using bench.sh, I would like to use it to measure the benefit of your implementation of BPC first. |
@apeters1971 I ran bench.sh and interpreted the results as explained in the draft post here : http://dachary.org/loic/ecbench/ . The numbers look good and will be even better after your code is merged :-) It would be great if you could run it independently and confirm the numbers. |
@loic yes will do, On Sat, Dec 14, 2013 at 2:41 AM, Loic Dachary notifications@github.comwrote:
|
I use
and
so jerasure compiles with -O3 instead of -O2 |
rebased against master and verified that make check is happy. ceph_erasure_code_benchmark was wrongfully listed as a unit test, it is a debug program. Also added packaging information. Foucault de Bonneval verified that it runs and provides consistent results on Dell R620. Now checking to see if gitbuilder would be happy about the change. |
When profiling, tools such as valgrind --tool=callgrind require that the dynamically loaded libraries are not dlclosed so they can collect usage information. The public ErasureCodePluginRegistry::disable_dlclose boolean is introduced for this purpose. Signed-off-by: Loic Dachary <loic@dachary.org>
The XOR based example is ten times slower than it could because it uses the buffer::ptr[] operator. Use a temporary char * instead. It performs as well as jerasure Reed Solomon when decoding with a single erasure: $ ceph_erasure_code_benchmark \ --plugin example --parameter erasure-code-directory=.libs \ --parameter erasure-code-technique=example \ --parameter erasure-code-k=2 --parameter erasure-code-m=1 \ --erasure 1 --workload decode --iterations 5000 8.095007 5GB $ ceph_erasure_code_benchmark \ --plugin jerasure --parameter erasure-code-directory=.libs \ --parameter erasure-code-technique=reed_sol_van \ --parameter erasure-code-k=10 --parameter erasure-code-m=6 \ --erasure 1 --workload decode --iterations 5000 7.870990 5GB Signed-off-by: Loic Dachary <loic@dachary.org>
As shown in https://www.usenix.org/legacy/events/fast09/tech/full_papers/plank/plank_html/ under "Impact of the Packet Size", the optimal for is in the order of 1k rather than the current default of 8. Benchmarks are required to find the actual optimum. Signed-off-by: Loic Dachary <loic@dachary.org>
Implement the ceph_erasure_code_benchmark utility to: * load an erasure code plugin * loop over the encode/decode function using the parameters from the command line * print the number of bytes encoded/decoded and the time to process When decoding, random chunks ( as set with --erasures ) are lost on each run. For instance: $ ceph_erasure_code_benchmark \ --plugin jerasure \ --parameter erasure-code-directory=.libs \ --parameter erasure-code-technique=reed_sol_van \ --parameter erasure-code-k=2 \ --parameter erasure-code-m=2 \ --workload decode \ --erasures 2 \ --iterations 1000 0.964759 1048576 shows 1GB is decoded in 1second. It is intended to be used by other scripts to present a human readable output or detect performance regressions. Signed-off-by: Loic Dachary <loic@dachary.org>
Display benchmark results for the default erasure code plugins, in a tab separated CSV file. The first two column contain the amount of KB that were coded or decoded, for a given combination of parameters displayed in the following fields. seconds KB plugin k m work. iter. size eras. 1.2 10 example 2 1 encode 10 1024 0 0.5 10 example 2 1 decode 10 1024 1 It can be used as input for a human readable report. It is also intented to be used to show if a given version of an erasure code plugin performs better than another. The last column ( not shown above for brievety ) is the exact command that was run to produce the result so it can be copy / pasted to reproduce them or to profile. Only the jerasure techniques mentionned in https://www.usenix.org/legacy/events/fast09/tech/full_papers/plank/plank_html/ are benchmarked, the others are assumed to be less interesting. Signed-off-by: Loic Dachary <loic@dachary.org>
Add to the packaging for RPMs and DEBs Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Loic Dachary <loic@dachary.org>
@apeters1971 implemented -h as you suggested and made it so no argument issues a sensible error message instead of a stack trace |
osd: erasure code benchmark tool Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch> Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
cephfs: update tests to enable multimds when needed
Implement the ceph_erasure_code_benchmark utility to:
line
For instance:
shows 1GB is encoded in 1second.
Signed-off-by: Loic Dachary loic@dachary.org