-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Backend] Utilizes no_alloc variant of JErasure to avoid heap allocation #1
Conversation
@windkit |
@mocchira Stack size is indeed one of my concerns about the PRs The biggest usage happens in
It would consume To set the suggested stack size, we need to first limit the possible parameters from users. Alternatively, we can move back these large structures to heap (with |
@windkit Thanks. Given that there are 32 cores (which typically means 32 scheduler threads on default VM parameters), I may ask you to benchmark erasure coding features with different +sss settings. |
While the size of int varies with different platforms, it is usually 4 bytes. I will start benchmarking the performance with different stack size. |
LGTM. |
Benchmark Results are uploaded. Cauchy-RS is used as it is the most heavy one in terms of stack size. In short, the PR improves the performance a bit (~5%) and stack size ( EncodingDecoding |
@windkit Thanks. |
Sure, I am running a 10 hours, encode+decode 1:1 test now. |
@windkit After the current benchmark, I'd like to ask you to benchmark |
@mocchira Please find the long run test result at @yosukehara I will now move on to the testing with LeoFS |
@yosukehara @mocchira |
@windkit Thanks for benchmarking that. It is good result to me, and I've just recognized it is almost same result with 20151222_isars_k10m4_15m_r49w1_60min_1. I'd like to ask you to benchmark both |
@yosukehara I will start testing the two coding scheme for 6 hours to check the stability. |
@windkit thanks. |
@yosukehara The 6 hr test result are uploaded at JErasure Vand-RS (10,4) ISA-L RS (10,4) |
@windkit Thanks a lot. |
@windkit |
@mocchira I am starting 6 hrs test for all the coding scheme supported. |
4b6cd2b
to
712e726
Compare
@mocchira Benchmark Result could be found at |
ff9eebb
to
f2219b3
Compare
9deea67
to
d1b37d2
Compare
By mistake, I messed the branches, currently I am fixing them, please wait for the moment. |
583b3c3
to
5215e59
Compare
The problem has been fixed, sorry for that. In the process I spotted another memory leak with |
[Backend] Utilizes no_alloc variant of JErasure to avoid heap allocation
LGTM. |
Description
JErasure Library uses lots of heap allocation for temporary structure.
The large number of small allocation/deallocation may have performance impact.
When used in NIF, some memory issue is encountered (Random Segmentation Fault)
Purposed Solution
Added a separate code path which avoid memory allocation (structures are allocated by caller beforehand), putting temporary structure in stack.
Related Issue
leo-project/leofs#440
Relate PR
leo-project/jerasure#3
leo-project/jerasure#4
#1