User Resource Query

Context

In the multi-tenant management framework, you can query the real-time or historical usage of all user resources (including memory, CPU cores, storage space, temporary space, and I/Os).

  • User real-time resource views/functions: PG_TOTAL_USER_RESOURCE_INFO and GS_WLM_USER_RESOURCE_INFO; user historical resource table: GS_WLM_USER_RESOURCE_HISTORY.
  • In the preceding views and tables, the value of used_cpu indicates the CPU usage of a user's resource pool. The resource pool records only the CPU usage of long queries.
  • In the preceding views and tables, I/O-related resource statistics only record I/O read and write data of long queries executed by users.
  • When there are a large number of users and a large cluster, querying such real-time views will cause network latency due to the real-time communication overhead between CNs and DNs.
  • User memory and CPU monitoring does not apply to short queries or administrator jobs.

Procedure