-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-19737: ABFS: Add metrics to identify improvements with read and write aggressiveness #8056
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
base: trunk
Are you sure you want to change the base?
Conversation
|
💔 -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. |
| */ | ||
| @Override | ||
| public AbfsWriteThreadPoolMetrics getAbfsWriteThreadPoolMetrics() { | ||
| return abfsWriteThreadPoolMetrics != null ? abfsWriteThreadPoolMetrics : null; |
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.
we can have it as- return abfsWriteThreadPoolMetrics;
Same for getAbfsReadThreadPoolMetrics() below
| if (lastTime == ZERO) { | ||
| lastCpuTime = cpuTime; | ||
| lastTime = now; | ||
| return 0.0; // first call has no previous data |
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.
nit: we can use ZERO_D here too
| * Closes this manager by shutting down executors and cleaning up resources. | ||
| * Removes the instance from the active manager map. | ||
| * | ||
| * @throws IOException if an error occurs during shutdown. |
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.
we are throwing this exception right?
| public String toString() { | ||
| return String.format( | ||
| "currentPoolSize=%d, maxPoolSize=%d, activeThreads=%d, jvmCpuUtilization=%.2f%%, cpuUtilization=%.2f%%, availableHeap=%dGB", | ||
| currentPoolSize, maxPoolSize, activeThreads, jvmCpuUtilization, cpuUtilization * HUNDRED, availableHeapGB); |
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.
we dont need to multiply jvmCpuUtilization also by 100?
Also, should we be multiplying with HUNDRED_D instead?
| configuration1.set(FS_AZURE_ENABLE_PREFETCH_REQUEST_PRIORITY, "true"); | ||
|
|
||
| Configuration configuration2 = new Configuration(getRawConfiguration()); | ||
| //use the default value for the config: 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.
we can remove the comment as well. The default traffic priority value is true now
| if (lastTime == ZERO) { | ||
| lastCpuTime = cpuTime; | ||
| lastTime = now; | ||
| return 0.0; // first call has no previous data |
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.
nit: we can use ZERO_D
| @Test | ||
| public void verifyWriteRequestOfBufferSizeAndClose() throws Exception { | ||
|
|
||
| AbfsCounters abfsCounters = Mockito.spy(new AbfsCountersImpl(new URI("abcd"))); |
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.
we can have a constant for URI "abcd"
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.
if creating mock client handlers, client, abfsrestop, spying abfscounters is repeated- then we could have it as a helper method maybe
Introduces new performance metrics in the ABFS driver to monitor and evaluate the effectiveness of read and write aggressiveness tuning. These metrics help in understanding how thread pool behavior, CPU utilization, and heap availability impact overall I/O throughput and latency. By capturing detailed statistics such as active thread count, pool size, and system resource utilization, this enhancement enables data-driven analysis of optimizations made to improve ABFS read and write performance under varying workloads.