Resource Pool Monitoring

Overview

In the multi-tenant management framework, if queries are associated with resource pools, the resources occupied by the queries are summarized to the associated resource pools. You can query the real-time resource usage of all resource pools in the resource pool monitoring view and query the historical resource usage of resource pools in the resource pool monitoring history table.

The resource pool monitoring data is updated every 5s. However, due to the time difference between CNs and DNs, the actual monitoring data update time may be longer than 5s. Generally, the time does not exceed 10s. The resource pool monitoring data is persisted every 30 seconds. The resource pool monitoring logic is basically the same as that of the user resource monitoring. Therefore, the enable_user_metric_persistent and user_metric_retention_time parameters are used to control the persistence and aging of resource pool monitoring data, respectively.

Resources monitored by a resource pool include the running and queuing information of fast and slow lane jobs, and CPU, memory, and logical I/O resource monitoring information. The monitoring views and history tables are as follows:

  1. Real-time monitoring view of resource pools (single CN): GS_RESPOOL_RUNTIME_INFO
  2. Real-time monitoring view of resource pools (all CNs): PGXC_RESPOOL_RUNTIME_INFO
  3. Real-time monitoring view of resource pool resources (single CN): GS_RESPOOL_RESOURCE_INFO
  4. Real-time monitoring view of resource pool resources (all CNs): PGXC_RESPOOL_RESOURCE_INFO
  5. Historical resource monitoring table of the resource pool (single CN):
  6. Monitoring view of historical resource pool resources (all CNs):
  • Resource pool monitoring monitors the CPU, I/O, and memory usage of all jobs on the fast and slow lanes.
  • Currently, the memory and CPU usage of fast track jobs are not controlled. When the fast lane jobs occupy a large number of resources, the used resources may exceed the resource limit.
  • In the monitoring view of DN resource pools, I/O, memory, and CPU display the resource usage and limits of resource pools.
  • In the monitoring view of CN resource pools, I/O, memory, and CPU display the total resource usage and limit of all DN resource pools in the cluster.
  • Resource pool monitoring information on DNs is updated every 5 seconds. CNs collect resource pool monitoring information from DNs every 5 seconds. Because each instance updates or collects resource pool monitoring information independently, the monitoring information update time on each instance may be different.
  • The auxiliary thread automatically invokes the persistence function every 30 seconds to make the resource pool monitoring data persistent. So, normally, you don't need to do this.

Procedure