Skip to content

HBASE-27948 Report memstore on-heap and off-heap size as jmx metrics in sub=Memory bean - #5293

Merged
virajjasani merged 2 commits into
apache:masterfrom
jinggou:HBASE-27892
Jun 29, 2023
Merged

HBASE-27948 Report memstore on-heap and off-heap size as jmx metrics in sub=Memory bean#5293
virajjasani merged 2 commits into
apache:masterfrom
jinggou:HBASE-27892

Conversation

@jinggou

@jinggoujinggou commented Jun 15, 2023

Copy link
Copy Markdown
Contributor

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 26sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for branch
+1 💚mvninstall2m 49smaster passed
+1 💚compile2m 50smaster passed
+1 💚checkstyle0m 41smaster passed
+1 💚spotless0m 42sbranch has no errors when running spotless:check.
+1 💚spotbugs1m 48smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall2m 29sthe patch passed
+1 💚compile2m 45sthe patch passed
+1 💚javac2m 45sthe patch passed
-0 ⚠️checkstyle0m 7shbase-hadoop-compat: The patch generated 4 new + 0 unchanged - 0 fixed = 4 total (was 0)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck9m 39sPatch does not cause any errors with Hadoop 3.2.4 3.3.5.
-1 ❌spotless0m 12spatch has 43 errors when running spotless:check, run spotless:apply to fix.
+1 💚spotbugs2m 0sthe patch passed
_ Other Tests _
+1 💚asflicense0m 16sThe patch does not generate ASF License warnings.
34m 11s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5293
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux ed0f2bb4edd3 5.4.0-1101-aws #109~18.04.1-Ubuntu SMP Mon Apr 24 20:40:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4be74d2
Default JavaEclipse Adoptium-11.0.17+8
checkstylehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-hadoop-compat.txt
spotlesshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/artifact/yetus-general-check/output/patch-spotless.txt
Max. process+thread count79 (vs. ulimit of 30000)
modulesC: hbase-hadoop-compat hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 26sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for branch
+1 💚mvninstall2m 47smaster passed
+1 💚compile0m 54smaster passed
+1 💚shadedjars4m 55sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 33smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall2m 29sthe patch passed
+1 💚compile0m 53sthe patch passed
+1 💚javac0m 53sthe patch passed
+1 💚shadedjars4m 56spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 33sthe patch passed
_ Other Tests _
+1 💚unit0m 36shbase-hadoop-compat in the patch passed.
+1 💚unit207m 51shbase-server in the patch passed.
231m 30s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5293
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 414ebd934263 5.4.0-1101-aws #109~18.04.1-Ubuntu SMP Mon Apr 24 20:40:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4be74d2
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/testReport/
Max. process+thread count4690 (vs. ulimit of 30000)
modulesC: hbase-hadoop-compat hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 30sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for branch
+1 💚mvninstall2m 27smaster passed
+1 💚compile0m 49smaster passed
+1 💚shadedjars4m 57sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 33smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall2m 12sthe patch passed
+1 💚compile0m 48sthe patch passed
+1 💚javac0m 48sthe patch passed
+1 💚shadedjars4m 55spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 31sthe patch passed
_ Other Tests _
+1 💚unit0m 32shbase-hadoop-compat in the patch passed.
+1 💚unit215m 38shbase-server in the patch passed.
238m 33s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5293
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 32f0229470c3 5.4.0-1099-aws #107~18.04.1-Ubuntu SMP Fri Mar 17 16:49:05 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4be74d2
Default JavaTemurin-1.8.0_352-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/testReport/
Max. process+thread count4469 (vs. ulimit of 30000)
modulesC: hbase-hadoop-compat hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 43sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for branch
+1 💚mvninstall4m 13smaster passed
+1 💚compile4m 30smaster passed
+1 💚checkstyle1m 45smaster passed
+1 💚spotless1m 30sbranch has no errors when running spotless:check.
+1 💚spotbugs3m 42smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 20sMaven dependency ordering for patch
+1 💚mvninstall5m 14sthe patch passed
+1 💚compile5m 18sthe patch passed
+1 💚javac5m 18sthe patch passed
+1 💚checkstyle1m 30sthe patch passed
+1 💚whitespace0m 1sThe patch has no whitespace issues.
+1 💚hadoopcheck14m 5sPatch does not cause any errors with Hadoop 3.2.4 3.3.5.
+1 💚spotless0m 42spatch has no errors when running spotless:check.
+1 💚spotbugs2m 5sthe patch passed
_ Other Tests _
+1 💚asflicense0m 16sThe patch does not generate ASF License warnings.
52m 54s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5293
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux 34edfa636c69 5.4.0-1101-aws #109~18.04.1-Ubuntu SMP Mon Apr 24 20:40:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4be74d2
Default JavaEclipse Adoptium-11.0.17+8
Max. process+thread count81 (vs. ulimit of 30000)
modulesC: hbase-hadoop-compat hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 42sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for branch
+1 💚mvninstall3m 0smaster passed
+1 💚compile1m 3smaster passed
+1 💚shadedjars6m 26sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 40smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall2m 47sthe patch passed
+1 💚compile0m 57sthe patch passed
+1 💚javac0m 57sthe patch passed
+1 💚shadedjars5m 31spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 34sthe patch passed
_ Other Tests _
+1 💚unit0m 36shbase-hadoop-compat in the patch passed.
+1 💚unit215m 37shbase-server in the patch passed.
242m 18s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5293
Optional Testsjavac javadoc unit shadedjars compile
unameLinux de017a2c84b2 5.4.0-1099-aws #107~18.04.1-Ubuntu SMP Fri Mar 17 16:49:05 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4be74d2
Default JavaTemurin-1.8.0_352-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/testReport/
Max. process+thread count4529 (vs. ulimit of 30000)
modulesC: hbase-hadoop-compat hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 55sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for branch
+1 💚mvninstall2m 43smaster passed
+1 💚compile1m 2smaster passed
+1 💚shadedjars4m 44sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 41smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall2m 37sthe patch passed
+1 💚compile1m 2sthe patch passed
+1 💚javac1m 2sthe patch passed
+1 💚shadedjars4m 39spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 37sthe patch passed
_ Other Tests _
+1 💚unit0m 46shbase-hadoop-compat in the patch passed.
+1 💚unit224m 43shbase-server in the patch passed.
249m 8s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5293
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 460e8ddb8193 5.4.0-148-generic #165-Ubuntu SMP Tue Apr 18 08:53:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 4be74d2
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/testReport/
Max. process+thread count4721 (vs. ulimit of 30000)
modulesC: hbase-hadoop-compat hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

String UNBLOCKED_FLUSH_GAUGE_DESC = "Gauge for the unblocked flush count before tuning";
String MEMSTORE_SIZE_GAUGE_NAME = "memStoreSize";
String MEMSTORE_SIZE_GAUGE_DESC = "Global MemStore used in bytes by the RegionServer";
String MEMSTORE_ONHEAP_SIZE_GAUGE_NAME = "memStoreOnHeapSize";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use OnHeap or just Heap? I'm not an English expert, just asking...

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both Heap and OnHeap are used to referring to on-heap size in our code, so I think both are okay, and choose OnHeap here to differentiate it with OffHeap.

long globalMemstoreHeapSize = regionServerAccounting.getGlobalMemStoreHeapSize();
long globalMemStoreOffHeapSize = regionServerAccounting.getGlobalMemStoreOffHeapSize();
tunerContext.setCurMemStoreUsed((float) globalMemstoreHeapSize / maxHeapSize);
metricsHeapMemoryManager.setCurMemStoreSizeGauge(globalMemstoreHeapSize);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in the old time we just use heap size as memstore size? This should be bug?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is what i was wondering.
FYI @bbeaudreault as he discovered this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah interesting.

So I wasn't talking about these metrics at all. These metrics show up in JMX under sub=Memory (which for us is all 0's for some reason, and we don't use them).

The metrics I was referring to are in sub=Server and also per-region and per-table metrics. These also have a memStoreSize field, and it is derived from the DataSize rather than HeapSize. These are calculated in a few places, you have to sort of dig in based on usages of MetricsRegionServerSource.MEMSTORE_SIZE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion, I didn't realize these metrics existed. Maybe they are better? I need to read more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was not aware either, realized these metrics exist and this is likely bug only after Jing created this PR, i also need to do some digging here.

Thanks for pointing out sub=Server@bbeaudreault

FYI @jinggou

@jinggoujinggouJun 22, 2023

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbeaudreault Sorry I didn't realize that you are referring to sub=Server. This change is made for sub=Memory, so I create a new pr (#5308) for HBASE-27892.

For the code change here, I think it might be a bug because memStoreSize should refer to memstore data size instead of memstore heap size, and also noticed that its value is 0 under sub=Memory (while not 0 under sub=Server). I've created a new jira HBASE-27948 to figure out this issue. @Apache9@virajjasani

@jinggoujinggou changed the title HBASE-27892 Report memstore on-heap and off-heap size as jmx metricsHBASE-27948 Report memstore on-heap and off-heap size as jmx metrics in sub=Memory beanJun 22, 2023
@virajjasani

Copy link
Copy Markdown
Contributor

"memStoreSize" metric under sub=Memory is 0 for some reason

@jinggou what about the new metrics that you introduced with this PR? they are also being reported as 0 under Memory section?

@jinggou

Copy link
Copy Markdown
ContributorAuthor

"memStoreSize" metric under sub=Memory is 0 for some reason

@jinggou what about the new metrics that you introduced with this PR? they are also being reported as 0 under Memory section?

Yes.

@virajjasani

Copy link
Copy Markdown
Contributor

"memStoreSize" metric under sub=Memory is 0 for some reason

@jinggou what about the new metrics that you introduced with this PR? they are also being reported as 0 under Memory section?

Yes.

this needs work, maybe in separate Jira

@virajjasani
virajjasani merged commit 25455b6 into apache:masterJun 29, 2023
virajjasani pushed a commit that referenced this pull request Jun 29, 2023
…in sub=Memory bean (#5293)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
virajjasani pushed a commit that referenced this pull request Jun 29, 2023
…in sub=Memory bean (#5293)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
virajjasani pushed a commit that referenced this pull request Jun 29, 2023
…in sub=Memory bean (#5293)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@jinggou@Apache-HBase@virajjasani@bbeaudreault@Apache9