metrics: add disk io read write bytes #2265
Merged
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.
Description
In the context of disk information within a process, "rchar" and "readbytes" are two distinct metrics that measure the performance of disk read operations. The key differences and the aspects they focus on:
rchar measures the total number of characters read from the disk, regardless of whether these characters are cached. This includes characters read into the cache as well as those read directly from the disk. It is a broader metric, taking into account all data read from the disk.
readbytes measures the actual number of bytes read from the disk to the user space. Unlike rchar, readbytes does not include data read into the cache; it focuses solely on the amount of data transmitted to the application. This provides a more accurate reflection of the impact of disk reads on the application.
In some cases, the value of rchar may be greater than that of readbytes, as rchar considers all read operations, including data read into the cache.
However, when analyzing the impact of the disk on geth's performance, readbytes is typically more useful.
Rationale
makes it easy to get the real bandwidth consumption of the disk to determine if it is a disk bottleneck or not
Example
NA
Changes
Notable changes: