ファイルキャッシュ統計
概要
各BEノードのデータキャッシュに関連するメトリック情報を表示するために使用されます。メトリック情報は、BEのデータキャッシュに関連する監視メトリックから取得されます。
ヒント
このシステムテーブルは、バージョン2.1.6および3.0.2以降でサポートされています。
データベース
information_schema
テーブル情報
| カラム名 | 型 | 説明 |
|---|---|---|
| BE_ID | BIGINT | BEノードID |
| BE_IP | VARCHAR(256) | BEノードIP |
| CACHE_PATH | VARCHAR(256) | BEノードキャッシュパス |
| METRIC_NAME | VARCHAR(256) | メトリック名 |
| METRIC_VALUE | DOUBLE | メトリック値 |
注記
Dorisの異なるバージョンでは、異なるメトリックが存在する場合があります
2.1.xメトリック
重要なメトリックのみをリストアップしています。
-
normal_queue_curr_elements現在キャッシュ内にあるFile Blockの数。
-
normal_queue_max_elementsキャッシュで許可されるFile Blockの最大数。
-
normal_queue_curr_size現在のキャッシュサイズ。
-
normal_queue_max_size許可される最大キャッシュサイズ。
-
hits_ratioBE起動以降の全体的なキャッシュヒット率。範囲0-1。
-
hits_ratio_5m直近5分間のキャッシュヒット率。範囲0-1。
-
hits_ratio_1h直近1時間のキャッシュヒット率。範囲0-1。
3.0.xメトリック
TODO
例
-
すべてのキャッシュメトリックをクエリする
mysql> select * from information_schema.file_cache_statistics;
+-------+---------------+----------------------------+----------------------------+--------------------+
| BE_ID | BE_IP | CACHE_PATH | METRIC_NAME | METRIC_VALUE |
+-------+---------------+----------------------------+----------------------------+--------------------+
| 10003 | 172.20.32.136 | /mnt/output/be/file_cache/ | normal_queue_curr_elements | 1392 |
| 10003 | 172.20.32.136 | /mnt/output/be/file_cache/ | normal_queue_curr_size | 248922234 |
| 10003 | 172.20.32.136 | /mnt/output/be/file_cache/ | normal_queue_max_elements | 102400 |
| 10003 | 172.20.32.136 | /mnt/output/be/file_cache/ | normal_queue_max_size | 21474836480 |
| 10003 | 172.20.32.136 | /mnt/output/be/file_cache/ | hits_ratio | 0.8539634687001242 |
| 10003 | 172.20.32.136 | /mnt/output/be/file_cache/ | hits_ratio_1h | 0 |
| 10003 | 172.20.32.136 | /mnt/output/be/file_cache/ | hits_ratio_5m | 0 |
+-------+---------------+----------------------------+----------------------------+--------------------+ -
クエリキャッシュのヒット率を取得してヒット率でソート
select * from information_schema.file_cache_statistics where METRIC_NAME = "hits_ratio" order by METRIC_VALUE desc;