apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
11.93k stars 3.14k forks source link

[Feature] Add system table `information_schema.mem_tracker` #36373

Closed xinyiZzz closed 1 week ago

xinyiZzz commented 1 month ago

Search before asking

Description

Goal

support querying MemTracker memory statistics

*`select from information_schema.mem_tracker;** show the table in this webip:8040/mem_tracker, return total of all BE and add a new columnBackend Host`. image

*`select from information_schema.mem_tracker where type="global"** and supports query byTypeandHost`, like this web: image

this document introduce MemTracker: https://doris.apache.org/docs/admin-manual/memory-management/memory-tracker

TODO: BE use an independent scanner to return result when select information_schema.table, so, can create a new mem_tracker_scanner to return MemTracker statistics.

Use case

No response

Related issues

No response

Are you willing to submit PR?

Code of Conduct

xinyiZzz commented 1 month ago

@Vallishp cc

Vallishp commented 1 month ago

will work on it.

xinyiZzz commented 3 weeks ago

https://github.com/apache/doris/pull/36679 show all memory state MemTrackerLimiter::make_all_memory_state_snapshots(&snapshots), used in mem_tracker_scanner, this is the result of select * from information_schema.mem_tracker.

xinyiZzz commented 1 week ago

impl: https://github.com/apache/doris/pull/37348