diff --git a/gpdb-doc/dita/admin_guide/workload_mgmt_resgroups.xml b/gpdb-doc/dita/admin_guide/workload_mgmt_resgroups.xml index 86a754c56d8a1354254a657abf892cedbc0f06a7..7f58111aef9ea069dca9f5f4532c233145e4a127 100644 --- a/gpdb-doc/dita/admin_guide/workload_mgmt_resgroups.xml +++ b/gpdb-doc/dita/admin_guide/workload_mgmt_resgroups.xml @@ -876,6 +876,34 @@ gpstart

+ + Viewing Resource Group CPU/Memory Usage Per Host + +

The + gp_toolkit system view enables you to view the real-time CPU + and memory usage of a resource group on a per-host basis. To view this + information:

+

+ =# SELECT * FROM gp_toolkit.gp_resgroup_status_per_host; + +

+ +
+ + Viewing Resource Group CPU/Memory Usage Per Segment + +

The + gp_toolkit system view enables you to view the real-time CPU + and memory usage of a resource group on a per-segment, per-host basis. To + view this information:

+

+ =# SELECT * FROM gp_toolkit.gp_resgroup_status_per_segment; + +

+ +
Viewing the Resource Group Assigned to a Role diff --git a/gpdb-doc/dita/ref_guide/gp_toolkit.xml b/gpdb-doc/dita/ref_guide/gp_toolkit.xml index 7153a6a3720b2d8ae497d64956d51c06339b1617..47b085a6b53c96b71f5b030ab59360a5ad728146 100644 --- a/gpdb-doc/dita/ref_guide/gp_toolkit.xml +++ b/gpdb-doc/dita/ref_guide/gp_toolkit.xml @@ -1544,7 +1544,7 @@ transaction submitted by a user against the limits configured for the user's resource group before running the transaction.

You can use the gp_resgroup_config view to check the configuration of each - resource group. You can use the gp_resgroup_status view to display the + resource group. You can use the gp_resgroup_status* views to display the current transaction status and resource usage of each resource group.

memory_usage column output for an external component resource group for a single segment: "1":{"used":11, "limit_granted":15}

+ See the gp_resgroup_status_per_host and + gp_resgroup_status_per_segment views, described below, for + more user-friendly display of CPU and memory usage. + +
+ + gp_resgroup_status_per_host + +

The gp_resgroup_status_per_host + view displays the real-time CPU and memory usage (MBs) for each resource + group on a per-host basis. The view also displays available and granted + group fixed and shared memory for each resource group on a host.

+ + + gp_resgroup_status_per_host view + + + + + + Column + Description + + + + + rsgname + The name of the resource group. + + + groupid + The ID of the resource group. + + + hostname + The hostname of the segment host. + + + cpu + The real-time CPU usage of the resource group on the + host. + + + memory_used + The real-time memory usage of the resource group on + the host. This total includes resource group fixed and shared memory. + It also includes global shared memory used by the resource group. + + + memory_available + The unused fixed and shared memory for the resource + group that is available on the host. This total does not include available + resource group global shared memory. + + + memory_quota_used + The real-time fixed memory usage for the resource + group on the host. + + + memory_quota_available + The fixed memory available to the resource group + on the host. + + + memory_quota_proposed + The total amount of fixed memory that Greenplum + Database has allotted to the resource group on the host. + + + memory_shared_used + The group shared memory used by the resource + group on the host. If any global shared memory is used by the resource + group, this amount is included in the total as well. + + + memory_shared_available + The amount of group shared memory available to the + resource group on the host. Resource group global shared memory is not + included in this total. + + + memory_shared_granted + The portion of group shared memory that Greenplum + Database has allotted to the resource group on the host. Resource group + global shared memory is not included in this value. + + + memory_shared_proposed + The total amount of group shared memory requested + by the resource group on the host. + + + +
+

The memory_shared_granted value may be less than + memory_shared_proposed if the cluster does not have enough + memory to allot. It may be greater than memory_shared_proposed + when global shared memory is in use by the resource group. + memory_shared_granted and memory_shared_proposed + should reach the same value over time.

+

Sample output for the gp_resgroup_status_per_host view:

+ rsgname | groupid | hostname | cpu | memory_used | memory_available | memory_quota_used | memory_quota_available | memory_quota_proposed | memory_shared_used | memory_shared_available | memory_shared_granted | memory_shared_proposed +---------------+---------+------------+------+-------------+------------------+-------------------+------------------------+-----------------------+--------------------+-------------------------+-----------------------+------------------------ + admin_group | 6438 | my-desktop | 0.84 | 1 | 271 | 68 | 68 | 136 | 0 | 136 | 136 | 136 + default_group | 6437 | my-desktop | 0.00 | 0 | 816 | 0 | 400 | 400 | 0 | 416 | 416 | 416 +(2 rows) + +
+ + gp_resgroup_status_per_segment + +

The gp_resgroup_status_per_segment + view displays the real-time CPU and memory usage (MBs) for each resource + group on a per-segment-instance and per-host basis. The view also + displays available and granted group fixed and shared memory for each + resource group and segment instance combination on the host.

+ + + + gp_resgroup_status_per_segment view + + + + + + Column + Description + + + + + rsgname + The name of the resource group. + + + groupid + The ID of the resource group. + + + hostname + The hostname of the segment host. + + + segment_id + The content ID for a segment instance on the + segment host. + + + cpu + The real-time CPU usage of the resource group for the + segment instance on the host. + + + memory_used + The real-time memory usage of the resource group for + the segment instance on the host. This total includes resource group + fixed and shared memory. It also includes global shared memory used by + the resource group. + + + memory_available + The unused fixed and shared memory for the resource + group for the segment instance on the host. + + + memory_quota_used + The real-time fixed memory usage for the resource group + for the segment instance on the host. + + + memory_quota_available + The fixed memory available to the resource group for + the segment instance on the host. + + + memory_quota_proposed + The total amount of fixed memory that Greenplum Database + has allotted to the resource group for the segment on the host. This value + will be the same for all resource group and segment instance combinations + on a host. + + + memory_shared_used + The group shared memory used by the resource + group for the segment instance on the host. + + + memory_shared_available + The amount of group shared memory available + for the segment instance on the host. Resource group global shared memory + is not included in this total. + + + memory_shared_granted + The portion of group shared memory that + Greenplum Database has allotted to the resource group for the segment + instance on the host. Resource group global shared memory is not + included in this value. + + + memory_shared_proposed + The total amount of group shared memory requested + by the resource group on the host. This value will be the same for all + resource group and segment instance combinations on a host. + + + +
+

Query output for this view is similar to that of the + gp_resgroup_status_per_host view, and breaks out the CPU and + memory (used and available) for each segment instance on each host.

diff --git a/gpdb-doc/dita/ref_guide/ref_guide.ditamap b/gpdb-doc/dita/ref_guide/ref_guide.ditamap index c9508a8009fcd56c43f06202f01ea9e51eb26139..0c30a822e1eaf8712bc08ae865d7531a3e004df2 100644 --- a/gpdb-doc/dita/ref_guide/ref_guide.ditamap +++ b/gpdb-doc/dita/ref_guide/ref_guide.ditamap @@ -186,6 +186,8 @@ + + diff --git a/gpdb-doc/dita/ref_guide/system_catalogs/catalog_ref-views.xml b/gpdb-doc/dita/ref_guide/system_catalogs/catalog_ref-views.xml index a21482f0c7223263f5dae5fab903750bdacb252c..f66d82ea29b48b64472439dd7773f584ca9b905b 100644 --- a/gpdb-doc/dita/ref_guide/system_catalogs/catalog_ref-views.xml +++ b/gpdb-doc/dita/ref_guide/system_catalogs/catalog_ref-views.xml @@ -22,6 +22,12 @@
  • +
  • + +
  • +
  • + +
  • diff --git a/gpdb-doc/dita/ref_guide/system_catalogs/gp_resgroup_status_per_host.xml b/gpdb-doc/dita/ref_guide/system_catalogs/gp_resgroup_status_per_host.xml new file mode 100644 index 0000000000000000000000000000000000000000..4075c5705b9628ae54978139d73024cb81426789 --- /dev/null +++ b/gpdb-doc/dita/ref_guide/system_catalogs/gp_resgroup_status_per_host.xml @@ -0,0 +1,152 @@ + + + + gp_resgroup_status_per_host + +

    The gp_toolkit.gp_resgroup_status_per_host view allows administrators + to see current memory and CPU usage and allocation for each resource group on a + per-host basis.

    +

    Memory amounts are specified in MBs.

    + The gp_resgroup_status_per_host view is valid only when resource + group-based resource management is active. + + gp_toolkit.gp_resgroup_status_per_host + + + + + + + + column + type + references + description + + + + + + rsgname + + name + pg_resgroup.rsgname + The name of the resource group. + + + + groupid + + oid + pg_resgroup.oid + The ID of the resource group. + + + + hostname + + text + gp_segment_configuration.hostname + The hostname of the segment host. + + + + cpu + + numeric + + The real-time CPU usage of the resource group on the + host. + + + + memory_used + + integer + + The real-time memory usage of the resource group on + the host. This total includes resource group fixed and shared memory. + It also includes global shared memory used by the resource group. + + + + memory_available + + integer + + The unused fixed and shared memory for the resource + group that is available on the host. This total does not include available + resource group global shared memory. + + + + memory_quota_used + + integer + + The real-time fixed memory usage for the resource + group on the host. + + + + memory_quota_available + + integer + + The fixed memory available to the resource group + on the host. + + + + memory_quota_proposed + + integer + + The total amount of fixed memory that Greenplum + Database has allotted to the resource group on the host. + + + + memory_shared_used + + integer + + The group shared memory used by the resource + group on the host. If any global shared memory is used by the resource + group, this amount is included in the total as well. + + + + memory_shared_available + + integer + + The amount of group shared memory available to the + resource group on the host. Resource group global shared memory is not + included in this total. + + + + memory_shared_granted + + integer + + The portion of group shared memory that Greenplum + Database has allotted to the resource group on the host. Resource + group global shared memory is not included in this value. + + + + memory_shared_proposed + + integer + + The total amount of group shared memory requested + by the resource group on the host. + + + +
    + +
    diff --git a/gpdb-doc/dita/ref_guide/system_catalogs/gp_resgroup_status_per_segment.xml b/gpdb-doc/dita/ref_guide/system_catalogs/gp_resgroup_status_per_segment.xml new file mode 100644 index 0000000000000000000000000000000000000000..a7669016d256518ad12eadce63a2d630354057bf --- /dev/null +++ b/gpdb-doc/dita/ref_guide/system_catalogs/gp_resgroup_status_per_segment.xml @@ -0,0 +1,164 @@ + + + + gp_resgroup_status_per_segment + +

    The gp_toolkit.gp_resgroup_status_per_segment view allows administrators + to see current memory and CPU usage and allocation for each resource group on a + per-host and per-segment basis.

    +

    Memory amounts are specified in MBs.

    + The gp_resgroup_status_per_segment view is valid only when resource + group-based resource management is active. + + gp_toolkit.gp_resgroup_status_per_segment + + + + + + + + column + type + references + description + + + + + + rsgname + + name + pg_resgroup.rsgname + The name of the resource group. + + + + groupid + + oid + pg_resgroup.oid + The ID of the resource group. + + + + hostname + + text + gp_segment_configuration.hostname + The hostname of the segment host. + + + + segment_id + + smallint + gp_segment_configuration.content + The content ID for a segment instance on the + segment host. + + + + cpu + + numeric + + The real-time CPU usage of the resource group for the + segment instance on the host. + + + + memory_used + + integer + + The real-time memory usage of the resource group for + the segment instance on the host. This total includes resource group + fixed and shared memory. It also includes global shared memory used by + the resource group. + + + + memory_available + + integer + + The unused fixed and shared memory for the resource + group for the segment instance on the host. + + + + memory_quota_used + + integer + + The real-time fixed memory usage for the resource group + for the segment instance on the host. + + + + memory_quota_available + + integer + + The fixed memory available to the resource group for + the segment instance on the host. + + + + memory_quota_proposed + + integer + + The total amount of fixed memory that Greenplum Database + has allotted to the resource group for the segment on the host. This value + will be the same for all resource group and segment instance combinations + on a host. + + + + memory_shared_used + + integer + + The group shared memory used by the resource + group for the segment instance on the host. + + + + memory_shared_available + + integer + + The amount of group shared memory available + for the segment instance on the host. Resource group global shared memory + is not included in this total. + + + + memory_shared_granted + + integer + + The portion of group shared memory that + Greenplum Database has allotted to the resource group for the segment + instance on the host. Resource group global shared memory is not + included in this value. + + + + memory_shared_proposed + + integer + + The total amount of group shared memory requested + by the resource group on the host. This value will be the same for all + resource group and segment instance combinations on a host. + + + +
    + +