Skip to content
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-27948 Report memstore on-heap and off-heap size as jmx metrics in sub=Memory bean #5293

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

jinggou
Copy link
Contributor

@jinggou jinggou commented Jun 15, 2023

Jira: HBASE-27948

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 26s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for branch
+1 💚 mvninstall 2m 49s master passed
+1 💚 compile 2m 50s master passed
+1 💚 checkstyle 0m 41s master passed
+1 💚 spotless 0m 42s branch has no errors when running spotless:check.
+1 💚 spotbugs 1m 48s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for patch
+1 💚 mvninstall 2m 29s the patch passed
+1 💚 compile 2m 45s the patch passed
+1 💚 javac 2m 45s the patch passed
-0 ⚠️ checkstyle 0m 7s hbase-hadoop-compat: The patch generated 4 new + 0 unchanged - 0 fixed = 4 total (was 0)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 9m 39s Patch does not cause any errors with Hadoop 3.2.4 3.3.5.
-1 ❌ spotless 0m 12s patch has 43 errors when running spotless:check, run spotless:apply to fix.
+1 💚 spotbugs 2m 0s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 16s The patch does not generate ASF License warnings.
34m 11s
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4be74d2
Default Java Eclipse Adoptium-11.0.17+8
checkstyle https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-hadoop-compat.txt
spotless https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/artifact/yetus-general-check/output/patch-spotless.txt
Max. process+thread count 79 (vs. ulimit of 30000)
modules C: hbase-hadoop-compat hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 26s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for branch
+1 💚 mvninstall 2m 47s master passed
+1 💚 compile 0m 54s master passed
+1 💚 shadedjars 4m 55s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 33s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for patch
+1 💚 mvninstall 2m 29s the patch passed
+1 💚 compile 0m 53s the patch passed
+1 💚 javac 0m 53s the patch passed
+1 💚 shadedjars 4m 56s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 33s the patch passed
_ Other Tests _
+1 💚 unit 0m 36s hbase-hadoop-compat in the patch passed.
+1 💚 unit 207m 51s hbase-server in the patch passed.
231m 30s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4be74d2
Default Java Eclipse Adoptium-11.0.17+8
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/testReport/
Max. process+thread count 4690 (vs. ulimit of 30000)
modules C: hbase-hadoop-compat hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 30s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for branch
+1 💚 mvninstall 2m 27s master passed
+1 💚 compile 0m 49s master passed
+1 💚 shadedjars 4m 57s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 33s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for patch
+1 💚 mvninstall 2m 12s the patch passed
+1 💚 compile 0m 48s the patch passed
+1 💚 javac 0m 48s the patch passed
+1 💚 shadedjars 4m 55s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 31s the patch passed
_ Other Tests _
+1 💚 unit 0m 32s hbase-hadoop-compat in the patch passed.
+1 💚 unit 215m 38s hbase-server in the patch passed.
238m 33s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4be74d2
Default Java Temurin-1.8.0_352-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/testReport/
Max. process+thread count 4469 (vs. ulimit of 30000)
modules C: hbase-hadoop-compat hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 43s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for branch
+1 💚 mvninstall 4m 13s master passed
+1 💚 compile 4m 30s master passed
+1 💚 checkstyle 1m 45s master passed
+1 💚 spotless 1m 30s branch has no errors when running spotless:check.
+1 💚 spotbugs 3m 42s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 20s Maven dependency ordering for patch
+1 💚 mvninstall 5m 14s the patch passed
+1 💚 compile 5m 18s the patch passed
+1 💚 javac 5m 18s the patch passed
+1 💚 checkstyle 1m 30s the patch passed
+1 💚 whitespace 0m 1s The patch has no whitespace issues.
+1 💚 hadoopcheck 14m 5s Patch does not cause any errors with Hadoop 3.2.4 3.3.5.
+1 💚 spotless 0m 42s patch has no errors when running spotless:check.
+1 💚 spotbugs 2m 5s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 16s The patch does not generate ASF License warnings.
52m 54s
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4be74d2
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 81 (vs. ulimit of 30000)
modules C: hbase-hadoop-compat hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 42s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 10s Maven dependency ordering for branch
+1 💚 mvninstall 3m 0s master passed
+1 💚 compile 1m 3s master passed
+1 💚 shadedjars 6m 26s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 40s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for patch
+1 💚 mvninstall 2m 47s the patch passed
+1 💚 compile 0m 57s the patch passed
+1 💚 javac 0m 57s the patch passed
+1 💚 shadedjars 5m 31s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 34s the patch passed
_ Other Tests _
+1 💚 unit 0m 36s hbase-hadoop-compat in the patch passed.
+1 💚 unit 215m 37s hbase-server in the patch passed.
242m 18s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4be74d2
Default Java Temurin-1.8.0_352-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/testReport/
Max. process+thread count 4529 (vs. ulimit of 30000)
modules C: hbase-hadoop-compat hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 55s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for branch
+1 💚 mvninstall 2m 43s master passed
+1 💚 compile 1m 2s master passed
+1 💚 shadedjars 4m 44s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 41s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 2m 37s the patch passed
+1 💚 compile 1m 2s the patch passed
+1 💚 javac 1m 2s the patch passed
+1 💚 shadedjars 4m 39s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 37s the patch passed
_ Other Tests _
+1 💚 unit 0m 46s hbase-hadoop-compat in the patch passed.
+1 💚 unit 224m 43s hbase-server in the patch passed.
249m 8s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 4be74d2
Default Java Eclipse Adoptium-11.0.17+8
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/testReport/
Max. process+thread count 4721 (vs. ulimit of 30000)
modules C: hbase-hadoop-compat hbase-server U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5293/2/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@@ -118,6 +130,13 @@ public interface MetricsHeapMemoryManagerSource extends BaseSource {
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
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
Contributor Author

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.

tunerContext.setCurMemStoreUsed((float) globalMemstoreHeapSize / maxHeapSize);
metricsHeapMemoryManager.setCurMemStoreSizeGauge(globalMemstoreHeapSize);
Copy link
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
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
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
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
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

Copy link
Contributor Author

@jinggou jinggou Jun 22, 2023

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

@jinggou jinggou changed the title HBASE-27892 Report memstore on-heap and off-heap size as jmx metrics HBASE-27948 Report memstore on-heap and off-heap size as jmx metrics in sub=Memory bean Jun 22, 2023
@virajjasani
Copy link
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
Contributor Author

jinggou commented Jun 27, 2023

"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
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:master Jun 29, 2023
1 check passed
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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants