Skip to content

HBASE-23708 Support metrics for region traffic - #1069

Open
Yiran-wu wants to merge 1 commit into
apache:masterfrom
Yiran-wu:HBASE-23708
Open

HBASE-23708 Support metrics for region traffic#1069
Yiran-wu wants to merge 1 commit into
apache:masterfrom
Yiran-wu:HBASE-23708

Conversation

@Yiran-wu

Copy link
Copy Markdown
Contributor

I think we need some metrics to measure the amount of traffic being read and written to each region, which can help us more clearly analyze how much network resources are consumed by each region.

putBytes/getBytes/scanBytes/deleteBytes/incrementBytes/appendBytes/bulkLoadBytes

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 9sDocker 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.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep0m 34sMaven dependency ordering for branch
+1 💚mvninstall5m 46smaster passed
+1 💚compile1m 32smaster passed
+1 💚checkstyle1m 41smaster passed
+1 💚shadedjars5m 1sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 6smaster passed
+0 🆗spotbugs5m 8sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs6m 2smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall5m 29sthe patch passed
+1 💚compile1m 37sthe patch passed
+1 💚javac1m 37sthe patch passed
-1 ❌checkstyle1m 20shbase-server: The patch generated 1 new + 269 unchanged - 2 fixed = 270 total (was 271)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚shadedjars5m 53spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck19m 6sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚javadoc1m 6sthe patch passed
-1 ❌findbugs5m 10shbase-server generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
_ Other Tests _
+1 💚unit0m 33shbase-hadoop-compat in the patch passed.
+1 💚unit0m 39shbase-hadoop2-compat in the patch passed.
+1 💚unit156m 36shbase-server in the patch passed.
+1 💚asflicense1m 14sThe patch does not generate ASF License warnings.
230m 48s
ReasonTests
FindBugsmodule:hbase-server
Nullcheck of storeFileInfo at line 5669 of value previously dereferenced in org.apache.hadoop.hbase.regionserver.HRegion.replayWALBulkLoadEventMarker(WALProtos$BulkLoadDescriptor) At HRegion.java:5669 of value previously dereferenced in org.apache.hadoop.hbase.regionserver.HRegion.replayWALBulkLoadEventMarker(WALProtos$BulkLoadDescriptor) At HRegion.java:[line 5669]
SubsystemReport/Notes
DockerClient=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/1/artifact/out/Dockerfile
GITHUB PR#1069
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 187d8b9a8373 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1069/out/precommit/personality/provided.sh
git revisionmaster / 75b8501
Default Java1.8.0_181
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/1/artifact/out/diff-checkstyle-hbase-server.txt
findbugshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/1/artifact/out/new-findbugs-hbase-server.html
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/1/testReport/
Max. process+thread count5469 (vs. ulimit of 10000)
modulesC: hbase-hadoop-compat hbase-hadoop2-compat hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/1/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec3m 41sDocker 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.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep0m 34sMaven dependency ordering for branch
+1 💚mvninstall5m 52smaster passed
+1 💚compile1m 29smaster passed
+1 💚checkstyle1m 41smaster passed
+1 💚shadedjars5m 3sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 6smaster passed
+0 🆗spotbugs4m 59sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs5m 51smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall5m 28sthe patch passed
+1 💚compile1m 33sthe patch passed
+1 💚javac1m 33sthe patch passed
+1 💚checkstyle0m 10sThe patch passed checkstyle in hbase-hadoop-compat
+1 💚checkstyle0m 12sThe patch passed checkstyle in hbase-hadoop2-compat
+1 💚checkstyle1m 17shbase-server: The patch generated 0 new + 269 unchanged - 2 fixed = 269 total (was 271)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚shadedjars5m 3spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck17m 13sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚javadoc1m 4sthe patch passed
-1 ❌findbugs5m 11shbase-server generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
_ Other Tests _
+1 💚unit0m 32shbase-hadoop-compat in the patch passed.
+1 💚unit0m 39shbase-hadoop2-compat in the patch passed.
+1 💚unit159m 27shbase-server in the patch passed.
+1 💚asflicense1m 13sThe patch does not generate ASF License warnings.
232m 46s
ReasonTests
FindBugsmodule:hbase-server
Nullcheck of storeFileInfo at line 5669 of value previously dereferenced in org.apache.hadoop.hbase.regionserver.HRegion.replayWALBulkLoadEventMarker(WALProtos$BulkLoadDescriptor) At HRegion.java:5669 of value previously dereferenced in org.apache.hadoop.hbase.regionserver.HRegion.replayWALBulkLoadEventMarker(WALProtos$BulkLoadDescriptor) At HRegion.java:[line 5669]
SubsystemReport/Notes
DockerClient=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/2/artifact/out/Dockerfile
GITHUB PR#1069
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux ef5413e83807 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1069/out/precommit/personality/provided.sh
git revisionmaster / 50e2644
Default Java1.8.0_181
findbugshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/2/artifact/out/new-findbugs-hbase-server.html
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/2/testReport/
Max. process+thread count5354 (vs. ulimit of 10000)
modulesC: hbase-hadoop-compat hbase-hadoop2-compat hbase-server U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/2/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Yiran-wu

Copy link
Copy Markdown
ContributorAuthor

This error can be ignored. I didn't change it. What about the others?

Nullcheck of storeFileInfo at line 5669

@saintstacksaintstack left a comment

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.

Thanks for doing this. For sure we are not double counting? These are not exposed already? If not, nice addition. They just show in JMX? Exposing them in UI would be a follow-on?

Thanks for doing this.

if (mutation instanceof Put) {
HRegion.updateCellTimestamps(familyCellMaps[index].values(), byteTS);
miniBatchOp.incrementNumOfPuts();
miniBatchOp.incrementBytesForPuts(mutation.heapSize());

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.

Do we traverse any synchronize blocks here or update any volatiles? In other words, wondering what the cost of these updates are.

We are also bulking up metrics w/ these added numbers... the metrics we send the master on each report (every second or so).

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.

We spend a lot of cpu counting currently. This adds to the counting load.

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.

@saintstack Thanks for review
At present, we only have aggregate information and cannot know how much network resources are used in each region.

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 too am concerned about the cost of evaluating heapSize() in a hot code path. Also, this is not the best estimate of the wire size of the put.

public void updatePut(final long size) {
source.updatePut();
source.updatePutBytes(size);
source.updateReceivedBytes(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.

What is the difference between put and received? They are not the same?

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.

Received contains all write operations such as increment/append/put/bulkload, putBytes consists of its own

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌patch0m 3s#1069 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
SubsystemReport/Notes
GITHUB PR#1069
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/1/console
versionsgit=2.17.1
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

2 similar comments
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌patch0m 3s#1069 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
SubsystemReport/Notes
GITHUB PR#1069
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/1/console
versionsgit=2.17.1
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌patch0m 3s#1069 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
SubsystemReport/Notes
GITHUB PR#1069
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1069/1/console
versionsgit=2.17.1
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

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.

4 participants

@Yiran-wu@Apache-HBase@charlesconnell@saintstack