Skip to main content
This guide is designed to help DBAs and operation engineers monitor the status of data load jobs through SQL interfaces—without relying on external monitoring systems. It also provides guidance on identifying performance bottlenecks and troubleshooting anomalies during load operations.

Terminology

Load Job: A continuous data load process, such as a Routine Load Job or Pipe Job. Load Task: A one-time data load process, usually corresponding to a single load transaction. Examples include Broker Load, Stream Load, Spark Load, and INSERT INTO. Routine Load jobs and Pipe jobs continuously generate tasks to perform data ingestion.

Observe load jobs

There are two ways to observe load jobs:

Observe load tasks

Load tasks can also be monitored in two ways:

SQL statements

The SHOW statements display both ongoing and recently completed load tasks for the current database, providing a quick overview of task status. The information retrieved is a subset of the _statistics_.loads_history system view. SHOW LOAD statements return information of Broker Load, Insert Into, and Spark Load tasks, and SHOW ROUTINE LOAD TASK statements return Routine Load task information.

System views

information_schema.loads

The information_schema.loads system view stores information about recent load tasks, including active and recently completed ones. The database periodically synchronizes the data to the _statistics_.loads_history system table for persistent storage. information_schema.loads provides the following fields:
RUNTIME_DETAILS
  • Universal metrics:
  • Specific metrics for Broker Load, INSERT INTO, and Spark Load:
  • Specific metrics for Routine Load:
  • Specific metrics for Stream Load:
PROPERTIES
  • Specific properties for Broker Load, INSERT INTO, and Spark Load:
  • Specific properties for Routine Load:

_statistics_.loads_history

The _statistics_.loads_history system view stores load records for the last 30 days by default. DBAs can adjust the retention period by modifying the FE configuration item loads_history_retained_days. Do not modify the partition_live_number property of the table directly, because the database resets it to the value of loads_history_retained_days. _statistics_.loads_history has the consistent schema with information_schema.loads.

Identify loading performance issues with Load Profiles

A Load Profile records execution details of all worker nodes involved in a data load. It helps you quickly pinpoint performance bottlenecks in the cluster.

Enable Load Profiles

The database provides multiple methods to enable Load Profiles, depending on the type of load:

For Broker Load and INSERT INTO

Enable Load Profiles for Broker Load and INSERT INTO at session level:
By default, profiles are automatically enabled for long-running jobs (longer than 30 seconds). You can customize this threshold by:
Note The default value of big_query_profile_threshold is 30s from v3.3.12, v3.4.2, and v3.5.0 onwards. In earlier versions, the default value is 0, which disables automatic profiling of long-running jobs. The database also supports Runtime Profiles, which periodically (every 30 seconds) report execution metrics of long-running load jobs. You can customize the report interval by:
Note runtime_profile_report_interval specifies only the minimum report interval for load tasks. The actual report interval is dynamically adjusted and may exceed this value.

For Stream Load and Routine Load

Enable Load Profiles for Stream Load and Routine Load at table level:
Stream Load typically has high QPS, so the database allows sampling for Load Profile collection to avoid performance degradation from extensive profiling. You can adjust the collection interval by configuring the FE parameter load_profile_collect_interval_second. This setting only applies to Load Profiles enabled via table properties. The default value is 0.
The database also allows collecting profiles only from load jobs that exceed a certain time threshold. You can adjust this threshold by configuring the FE parameter stream_load_profile_collect_threshold_second. The default value is 0.

Analyze Load Profiles

The structure of Load Profiles is identical to that of Query Profiles. For detailed instructions, see Query Tuning Recipes. You can analyze Load Profiles by executing ANALYZE PROFILE. For detailed instructions, see Analyze text-based Profiles. Profiles provide detailed operator metrics. Key components include the OlapTableSink operator and the LoadChannel operator.

PreSplit node

When the database attempts to pre-split a range-distributed target for INSERT, Broker Load, or an incremental materialized view refresh, the top-level Load Profile contains a PreSplit node. The node is omitted when the load does not attempt pre-splitting. The node contains the following time metrics: The node also contains the following counters: The information strings identify the execution path:

OlapTableSink operator

Tip
  • The significant variance between the maximum and minimum values of PushChunkNum in OLAP_TABLE_SINK indicates data skew in the upstream operator, which may cause write performance bottlenecks.
  • RpcClientSideTime equals the sum of RpcServerSideTime, Network transmission time, and RPC framework processing time. If the difference between RpcClientSideTime and RpcServerSideTime is significant, consider to enable data compression to reduce transmission time.
  • If RpcServerSideTime accounts for a significant portion of the time spent, further analysis can be conducted using LoadChannel Profile.

LoadChannel operator

Tip If WaitFlushTime takes an extended period, it may indicate insufficient resources for the flush thread. Consider adjusting the BE configuration flush_thread_num_per_store.

Best practices

Diagnose Broker Load performance bottleneck

  1. Load data using Broker Load:
  2. Use SHOW PROFILELIST to retrieve the list of runtime profiles.
  3. Use ANALYZE PROFILE to view the Runtime Profile.
The profile shows that the FILE_SCAN section took nearly 29 seconds, accounting for approximately 90% of the total 32-second duration. This indicates that reading data from object storage is currently the bottleneck in the loading process.

Diagnose Stream Load Performance

  1. Enable Load Profile for the target table.
  2. Use SHOW PROFILELIST to retrieve the list of profiles.
  3. Use ANALYZE PROFILE to view the Profile.

Appendix

Useful SQL for Operations

Note This section only applies to shared-nothing clusters.

query the throughput per minute

Query RowsetNum and SegmentNum of a table

  • High RowsetNum (>100) indicates too frequent loads. You may consider to reduce frequency or increase Compaction threads.
  • High SegmentNum (>100) indicates excessive segments per load. You may consider increase Compaction threads or adopt the random distribution strategy for the table.

Check data skew

Data skew across nodes
If you detected node-level skew, you may consider to use a higher-cardinality column as the distribution key or adopt the random distribution strategy for the table.
Data skew across tablets

Common monitoring metrics for loading

BE Load

These metrics are available under the BE Load category in Grafana. If you cannot find this category, verify that you are using the latest Grafana dashboard template.
ThreadPool
These metrics help analyze the status of thread pools — for example, whether tasks are being backlogged, or how long they spend pending. Currently, there are four monitored thread pools:
  • async_delta_writer
  • memtable_flush
  • segment_replicate_sync
  • segment_flush
Each thread pool includes the following metrics: Note
  • A reliable indicator for backlog is whether pending duration keeps increasing. workers util and queue count are necessary but not sufficient indicators.
  • If a backlog occurs, use rate and execute duration to determine whether it is due to increased load or slower processing.
  • workers util helps assess how busy the pool is, which can guide tuning efforts.
LoadChannel::add_chunks
These metrics help analyze the behavior of LoadChannel::add_chunks after receiving a BRPC tablet_writer_add_chunks request. Note
  • The latency metric equals the sum of wait_memtable, wait_writer, and wait_replica.
  • A high waiting ratio indicates downstream bottlenecks, which should be further analyzed.
Async Delta Writer
These metrics help analyze the behavior of the async delta writer. Note
  • The total time per task (from the upstream perspective) equals pending plus execute.
  • execute further includes wait_memtable plus wait_replica.
  • A high pending time may indicate that execute is slow or the thread pool is undersized.
  • If wait occupies a large portion of execute, downstream stages are the bottleneck; otherwise, the bottleneck is likely within the writer’s logic itself.
MemTable Flush
These metrics analyze MemTable flush performance. Note
  • By comparing rate and size, you can determine whether the workload is changing or if massive imports are occurring — for example, a small rate but large size indicates a massive import.
  • The compression ratio can be estimated using memory-size / disk-size.
  • You can also assess if I/O is the bottleneck by checking the proportion of io time in execute.
Segment Replicate Sync
Segment Flush
These metrics analyze segment flush performance. Note
  • By comparing rate and size, you can determine whether the workload is changing or if large imports are occurring — for example, a small rate but large size indicates a massive import.
  • You can also assess if I/O is the bottleneck by checking the proportion of io time in execute.