-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-7117. Consider reading chunk files using MappedByteBuffer. #3674
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
Conversation
jojochuang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @szetszwo for the PR!
The PR makes sense to me. I'll need to verify the performance difference in the cluster.
jojochuang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: I hope this patch can better leverage OS cache, get rid of the temporary heap buffer. Will verify and benchmark in a real cluster.
|
@jojochuang , thanks a lot for testing this! |
|
Please hold the merge as I am still doing a few more perf benchmarks. Thanks. |
|
@jojochuang , sure. Will wait for your test results. Thanks a lot! |
dc70681 to
1525353
Compare
|
@jojochuang Can this be merged? Are the test results out? |
|
@szetszwo , thanks for working on this. Do you have time to do a patch rebase? I did a micro performance test with a 4.5GB file, comparing the on heap buffer, off heap buffer and memory mapped buffer, here is the result. By default, DN will use 1MB(bytes.per.checksum) as the buffer size. So using memory mapped buffer can increase at least micro level performance a lot. |
|
@ChenSammi , thanks a lot for running the benchmark! When the file size is large, the performance is expected to be better for Let me update this change. |
|
@ChenSammi , this PR is to change reading the local files using java |
ChenSammi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last patch LGTM +1.
|
@ChenSammi , thanks a lot for reviewing this! |

What changes were proposed in this pull request?
From @jojochuang
What is the link to the Apache JIRA
HDDS-7117
How was this patch tested?
New unit test.