Add metrics for thread cpu consumption#9833
Merged
OneSizeFitsQuorum merged 35 commits intomasterfrom May 31, 2023
Merged
Conversation
metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/cpu/CpuUsageManager.java
Outdated
Show resolved
Hide resolved
metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/cpu/CpuUsageManager.java
Outdated
Show resolved
Hide resolved
metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/cpu/CpuUsageManager.java
Outdated
Show resolved
Hide resolved
metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/cpu/CpuUsageManager.java
Outdated
Show resolved
Hide resolved
metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/cpu/CpuUsageManager.java
Outdated
Show resolved
Hide resolved
Contributor
OneSizeFitsQuorum
left a comment
There was a problem hiding this comment.
Awesome Work!I have left some issues, PTAL~
server/src/main/java/org/apache/iotdb/db/service/metrics/ProcessMetrics.java
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/service/metrics/ProcessMetrics.java
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/iotdb/commons/concurrent/threadpool/WrappedSingleThreadExecutorService.java
Outdated
Show resolved
Hide resolved
node-commons/src/main/java/org/apache/iotdb/commons/concurrent/ThreadPoolMetrics.java
Show resolved
Hide resolved
node-commons/src/main/java/org/apache/iotdb/commons/concurrent/ThreadPoolMetrics.java
Show resolved
Hide resolved
metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/cpu/CpuUsageMetrics.java
Show resolved
Hide resolved
metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/cpu/CpuUsageMetrics.java
Show resolved
Hide resolved
node-commons/src/main/java/org/apache/iotdb/commons/concurrent/ThreadName.java
Outdated
Show resolved
Hide resolved
|
SonarCloud Quality Gate failed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Dashboard
The dashboard contains serveral panel, including thread pool cpu usage percentage, module cpu usage percentage, thread pool user mode(vs kernel mode) percentage, module user mode percentage, thread pool core size, thread pool active thread count, thread pool done task count, thread pool waiting task count.
Performance issue
I have done performance comparsion between this branch and master branch(commit: 1392e03) using IoT Benchmark in the same environment(8C 32G 5TB HDD) in standalone mode. I changed the default pull period for Prometheus from 15 seconds to 10 seconds in order to make the performance issues as obvious as possible. The result is shown as follow:
master branch
cpu-metrics
Conclusion
There is nearly no effect on write throughput and query ops of the system.