-
Notifications
You must be signed in to change notification settings - Fork 518
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
HDDS-9377. Implement some metrics with RW-lock instead of synchronization #7708
base: master
Are you sure you want to change the base?
Conversation
2f66e63
to
907cb96
Compare
Thanks @juncevich for the patch. It seems this removes synchronization in some individual metrics, but not in My 2 cents: I don't think we should reimplement Hadoop metrics system in Ozone with tweaks. Either improve it in Hadoop to benefit the ecosystem, or use a better existing metrics library in Ozone. |
Thanks for the notices. Could you tell me more about the |
Not "existing in Ozone", I meant "existing somewhere else, which we could start using in Ozone".
I consider (1) to be the worst option, both for Ozone and globally. |
I think (2) is the best option, but it takes the longest. I will ask about not synchronizing metrics in the Hadoop project. And will return with the answer. |
I looked at communication in Hadoop(mailing lists) and discussion and realization can take a long time ) |
@juncevich I have a few questions, what is the desired impact of this code change? Do you see a performance difference? How much is it? Answers to those questions will help us decide if it is ok to duplicate code but fix it to gain benefits. In the linked jira you do describe the problem but do not mention how much this PR will help solve the issue. Also, internal improvements sometimes do not lead to externally visible improvements, any details on how it helped speed up the test you'll deviced? |
@kerneltime The desired impact is to get rid of the locks in metrics collecting and improve writing speed. Without a fix, it was a 3000-3200 writing operation (CreateFile or CommitKey). After fixing it was 3600-3700. Improvement of more than 12%. |
What changes were proposed in this pull request?
Change synchronized metrics collect methods to read/write lock implementation.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9377
How was this patch tested?
I wrote the JUnit test (I'm not sure I should add this test to this PR) to compare performance metric realization.