メインコンテンツまでスキップ

メタデータメモリ解析

Doris BEのメモリ内のメタデータには、TabletRowsetSegmentTabletSchemaColumnReaderPrimaryKeyIndex、およびBloomFilterIndexなどのデータ構造が含まれます。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メモリ分析を参照してMetadataメモリを分析してください。

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