Uh oh!
There was an error while loading. Please reload this page.
[Improment]Add workload group resource usage - #39177
Conversation
doris-robot
commented
Aug 9, 2024
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| {"BE_ID", TYPE_BIGINT, sizeof(int64_t), false}, | ||
| {"WORKLOAD_GROUP_ID", TYPE_BIGINT, sizeof(int64_t), false}, | ||
| {"MEMORY_USAGE_BYTES", TYPE_BIGINT, sizeof(int64_t), false}, | ||
| {"CPU_USAGE", TYPE_VARCHAR, sizeof(StringRef), false}, |
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| } | ||
| SCOPED_RAW_TIMER(&_write_memtable_time); | ||
| ThreadCpuStopWatch cpu_time_stop_watch; |
There was a problem hiding this comment.
我觉得这个得加到async result writer 那个线程那里,这样所有的都被cover 住了
| builder().column("BE_ID", ScalarType.createType(PrimitiveType.BIGINT)) | ||
| .column("WORKLOAD_GROUP_ID", ScalarType.createType(PrimitiveType.BIGINT)) | ||
| .column("MEMORY_USAGE_BYTES", ScalarType.createType(PrimitiveType.BIGINT)) | ||
| .column("CPU_USAGE", ScalarType.createVarchar(256)) |
There was a problem hiding this comment.
要不把这列的类型定义为整数,这样用户可以排序。
然后把列名改成CPU_USAGE(%)这样
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| _next_io_time_micros += ret < 1 ? static_cast<int64_t>(1) : static_cast<int64_t>(ret); | ||
| } | ||
| _next_io_time_micros += ret < 1 ? static_cast<int64_t>(1) : static_cast<int64_t>(ret); | ||
| (*_io_adder) << io_bytes; |
There was a problem hiding this comment.
这里我感觉local 的也统计了,那么之前的就没必要再那个宏里修改了,直接都用这里的统计
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
7725bb5 to
f3f42f0ComparePR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
yiguolei
commented
Aug 10, 2024
run buildall |
doris-robot
commented
Aug 10, 2024
TPC-H: Total hot run time: 39938 ms |
doris-robot
commented
Aug 10, 2024
TPC-DS: Total hot run time: 204326 ms |
doris-robot
commented
Aug 10, 2024
ClickBench: Total hot run time: 30.93 s |
zclllyybb
left a comment
There was a problem hiding this comment.
LGTM. please add apache/doris-website's pr link in your pr content.
## Proposed changes ``` mysql [information_schema]>select BE_ID,WORKLOAD_GROUP_ID,CPU_USAGE,LOCAL_SCAN_BYTES_PER_SECOND/1024/1024 as scan_io_mb, MEMORY_USAGE_BYTES/1024/1024 mem_mb from workload_group_resource_usage; +-------+-------------------+-----------+--------------------+-------------------+ | BE_ID | WORKLOAD_GROUP_ID | CPU_USAGE | scan_io_mb | mem_mb | +-------+-------------------+-----------+--------------------+-------------------+ | 10005 | 62053 | 61.41% | 1516.4589414596558 | 27970.84313774109 | | 10005 | 1 | 0.00% | 0 | 0 | +-------+-------------------+-----------+--------------------+-------------------+ ```
## Proposed changes ``` mysql [information_schema]>select BE_ID,WORKLOAD_GROUP_ID,CPU_USAGE,LOCAL_SCAN_BYTES_PER_SECOND/1024/1024 as scan_io_mb, MEMORY_USAGE_BYTES/1024/1024 mem_mb from workload_group_resource_usage; +-------+-------------------+-----------+--------------------+-------------------+ | BE_ID | WORKLOAD_GROUP_ID | CPU_USAGE | scan_io_mb | mem_mb | +-------+-------------------+-----------+--------------------+-------------------+ | 10005 | 62053 | 61.41% | 1516.4589414596558 | 27970.84313774109 | | 10005 | 1 | 0.00% | 0 | 0 | +-------+-------------------+-----------+--------------------+-------------------+ ```
``` mysql [information_schema]>select BE_ID,WORKLOAD_GROUP_ID,CPU_USAGE,LOCAL_SCAN_BYTES_PER_SECOND/1024/1024 as scan_io_mb, MEMORY_USAGE_BYTES/1024/1024 mem_mb from workload_group_resource_usage; +-------+-------------------+-----------+--------------------+-------------------+ | BE_ID | WORKLOAD_GROUP_ID | CPU_USAGE | scan_io_mb | mem_mb | +-------+-------------------+-----------+--------------------+-------------------+ | 10005 | 62053 | 61.41% | 1516.4589414596558 | 27970.84313774109 | | 10005 | 1 | 0.00% | 0 | 0 | +-------+-------------------+-----------+--------------------+-------------------+ ```
``` mysql [information_schema]>select BE_ID,WORKLOAD_GROUP_ID,CPU_USAGE,LOCAL_SCAN_BYTES_PER_SECOND/1024/1024 as scan_io_mb, MEMORY_USAGE_BYTES/1024/1024 mem_mb from workload_group_resource_usage; +-------+-------------------+-----------+--------------------+-------------------+ | BE_ID | WORKLOAD_GROUP_ID | CPU_USAGE | scan_io_mb | mem_mb | +-------+-------------------+-----------+--------------------+-------------------+ | 10005 | 62053 | 61.41% | 1516.4589414596558 | 27970.84313774109 | | 10005 | 1 | 0.00% | 0 | 0 | +-------+-------------------+-----------+--------------------+-------------------+ ```
## Proposed changes ``` mysql [information_schema]>select BE_ID,WORKLOAD_GROUP_ID,CPU_USAGE,LOCAL_SCAN_BYTES_PER_SECOND/1024/1024 as scan_io_mb, MEMORY_USAGE_BYTES/1024/1024 mem_mb from workload_group_resource_usage; +-------+-------------------+-----------+--------------------+-------------------+ | BE_ID | WORKLOAD_GROUP_ID | CPU_USAGE | scan_io_mb | mem_mb | +-------+-------------------+-----------+--------------------+-------------------+ | 10005 | 62053 | 61.41% | 1516.4589414596558 | 27970.84313774109 | | 10005 | 1 | 0.00% | 0 | 0 | +-------+-------------------+-----------+--------------------+-------------------+ ```
Proposed changes