メインコンテンツまでスキップ
バージョン: 2.1

メタデータメモリ解析

Doris BEのメモリ内メタデータには、TabletRowsetSegmentTabletSchemaColumnReaderPrimaryKeyIndexBloomFilterIndexなどのデータ構造が含まれます。Doris BEメタデータの詳細については、ドキュメントAnalysis of Doris Storage Structure Designを参照してください。

メタデータ表示方法

現在、Memory TrackerはDoris BEのメタデータメモリサイズを正確にカウントしません。Doris BE BvarやDoris BE Metricsの一部のカウンターを確認してメタデータメモリサイズを推定するか、Heap Profileを使用してさらに詳しく分析できます。

Doris BE Bvar

Webページhttp://{be_host}:{brpc_port}/varsで、Bvarによってカウントされるメタデータ関連の指標を確認できます。

- `doris_total_tablet_num`: The number of all tablets.
- `doris_total_rowset_num`: The number of all rowsets.
- `doris_total_segment_num`: The number of all open segments.
- `doris_total_tablet_schema_num`: The number of all tablet schemas.
- `tablet_schema_cache_count`: The number of cached tablet schemas.
- `tablet_meta_schema_columns_count`: The number of columns in all tablet schemas.
- `tablet_schema_cache_columns_count`: The number of cached columns in a tablet schema.
- `doris_column_reader_num`: The number of open column readers.
- `doris_column_reader_memory_bytes`: the number of bytes occupied by the opened Column Reader.
- `doris_ordinal_index_memory_bytes`: the number of bytes occupied by the opened Ordinal Index.
- `doris_zone_map_memory_bytes`: the number of bytes occupied by the opened ZoneMap Index.
- `doris_short_key_index_memory_bytes`: the number of bytes occupied by the opened Short Key Index.
- `doris_pk/index_reader_bytes`: the cumulative number of bytes occupied by the Primary Key Index Reader. This is not a real-time statistical value and is expected to be fixed.
- `doris_pk/index_reader_pages`: Same as above, the cumulative value of the statistics.
- `doris_pk/index_reader_cached_pages`: Same as above, the cumulative value of the statistics.
- `doris_pk/index_reader_pagindex_reader_pk_pageses`: Same as above, cumulative value of statistics.
- `doris_primary_key_index_memory_bytes`: Same as above, cumulative value of statistics.

Doris BE Metrics

Webページhttp://{be_host}:{be_web_server_port}/metricsでは、BEプロセスのメモリ監視におけるいくつかのメタデータ指標(Metrics)を確認できます。このうち、Metadata Cache関連の指標についてはDoris Cache Memory Analysisを参照してください。

- `doris_be_all_rowsets_num`: The number of all Rowsets.
- `doris_be_all_segments_num`: The number of all Segments.

Heap Profileを使用してメタデータメモリを分析する

上記のDoris BE BvarとMetricsを使用してメモリの場所を正確に特定できない場合、クラスタを簡単に再起動でき、現象を再現できる場合は、Heap Profile Memory Analysisを参照してMetadataメモリを分析してください。

現象を再現した後、Heap Profileで大きなメモリ使用量を持つコールスタック内にTabletSegmentTabletSchemaColumnReaderフィールドが表示される場合、メタデータが大量のメモリを占有していることを基本的に確認できます。