-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-24659 Calculate FIXED_OVERHEAD automatically #2018
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
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.
I wonder do we still need the testSizes method in TestHeapSize after this change?
And we need a performance test to see if there are any impact on performance(although I believe no)
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
3 * Bytes.SIZEOF_INT + | ||
14 * Bytes.SIZEOF_LONG + | ||
3 * Bytes.SIZEOF_BOOLEAN); | ||
public static final long FIXED_OVERHEAD = ClassSize.estimateBase(HRegion.class, false); |
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.
Does ClassSize come up w/ same general numbers as old manual technique. It does deep size rather than shallow?
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.
I think ClassSize.estimateBase only calculate shallow size
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.
I thought it critical it did deep size? Do you get the same numbers roughly?
Yes, this change only affect class loading phase. And the calculation of FIXED_OVERHEAD cost less than 5 milliseconds |
🎊 +1 overall
This message was automatically generated. |
Let's run a YCSB or at least a PE to see the performance impact? |
yes,it is necessary, Let me do it |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@Apache9 sir,I have done the performance test, and attaches on jira page, please take a look ? |
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.
Seems no big difference.
+1.
@saintstack PTAL. If no objections, I will push this to master and branch-2. Thanks. |
@saintstack please have a look, thanks |
Oh, forgot to merge this one. Since you have pinged @saintstack again, let's wait until tomorrow... |
Pardon me for missing your pings @nyl3532016 ... let me look. |
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.
Thank you for waiting on my input. I had concerns but after checking this patch again and going back through git history, I see better what is going on and +1 this approach. Thank you for running the PE check. Good. This PR might make our class loading take a little longer but should have no effect on general perf I'd think. Thanks for the patch.
4 * Bytes.SIZEOF_BOOLEAN + Bytes.SIZEOF_LONG + | ||
//byte[] headers for column family and table name | ||
2 * ClassSize.ARRAY + 2 * ClassSize.REFERENCE); | ||
public static final long FIXED_OVERHEAD = ClassSize.estimateBase(HFileContext.class, false); |
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.
Or, sorry, yeah, FIXED_OVERHEAD is 'this' classes size; i.e. the shallow size (I think).
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.
I went back through history of ClassSize... its so old.
Co-authored-by: niuyulin <niuyulin@xiaomi.com> SIgned-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: stack <stack@apache.org>
Co-authored-by: niuyulin <niuyulin@xiaomi.com> SIgned-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: stack <stack@apache.org>
No description provided.