Skip to main content
Skip to main content

file_cache_statistics

Overview

Used to view the metric information related to data cache on each BE node. The metric information is sourced from the monitoring metrics related to BE's data cache.

tip

This system table is supported from versions 2.1.6 and 3.0.2.

Belongs to Database

information_schema

Table Information

Column NameTypeDescription
BE_IDBIGINTBE node ID
BE_IPVARCHAR(256)BE node IP
CACHE_PATHVARCHAR(256)BE node cache path
METRIC_NAMEVARCHAR(256)Metric name
METRIC_VALUEDOUBLEMetric value

Different Doris version may have different metrics

2.1.x Metrics

Only important metrics are listed.

  • normal_queue_curr_elements

    Number of File Blocks currently in the cache.

  • normal_queue_max_elements

    Maximum number of File Blocks allowed in the cache.

  • normal_queue_curr_size

    Current cache size.

  • normal_queue_max_size

    Maximum cache size allowed.

  • hits_ratio

    Overall cache hit ratio since BE startup.

  • hits_ratio_5m

    Cache hit ratio in the last 5 minutes.

  • hits_ratio_1h

    Cache hit ratio in the last 1 hour.

3.0.x Metrics

TODO

Examples

  1. Query all cache metrics

    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 |
    +-------+---------------+----------------------------+----------------------------+--------------------+
  2. Query cache hit ratio and sort by hit ratio

    select * from information_schema.file_cache_statistics where METRIC_NAME = "hits_ratio" order by METRIC_VALUE desc;