test/erasure-code: Get more accurate erasure code benchmark results by avoiding reallocating large buffers.#60121
Conversation
…ng large buffers Signed-off-by: Jamie Pryde <jamiepry@uk.ibm.com>
|
jenkins test make check arm64 |
|
jenkins test api |
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
This is a follow-up PR that adds more improvements to the erasure code bench following #59486. As stated in the earlier PR, we want to use large data buffers that don't fit in the CPU cache so that we can get a more accurate representation of the encoding and decoding performance of the various erasure code plugins that Ceph supports. It was noticed that repeatedly calling the encode and decode functions with very large buffers can result in lots of reallocations and system calls to grow and shrink the heap. For example, we see the following results when using a large 100MB buffer with 400 encode iterations:
The majority of the test time (7 of 11 seconds) is spent in system calls resizing the heap, rather than testing the performance of the EC plugin.
This PR changes the encode and decode benchmarks so that we have a single call to the encode or decode function to ensure proper alignment of buffers. Then on every further iteration we call encode_chunks or decode_chunks directly, using the same buffers from the first iteration. This means there is a single allocation of buffers followed by lots of testing of the plugin to encode/decode data. e.g:
I have made it more clear that there are 3 methods of running the decode test.
Method 1 = specify "-E exhaustive" - tests all possible erasure combinations. This will continue to use decode on every iteration due to needing to reallocate buffers.
Method 2 = specify specific chunks to erase with "--erased 0 --erased 1". This will call decode on the first iteration and decode_chunks on further iterations.
Method 3 = specify number of erasures with "--erasures 3". This randomly selects the chunks to erase. This will also call decode on the first iteration and decode_chunks on further iterations.
Also note that we still call encode on every iteration when testing LRC. I haven't looked into whether there is a nice workaround yet, but LRC requires that encode is called before encode_chunks on every iteration.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e