提交 40240513 编写于 作者: L Lisa Owen 提交者: David Yozie

docs - add new host/seg resource group usage views (#7061)

* docs - add new host/seg resource group usage views

* clarifications requested by ning
上级 1d4dfbb7
......@@ -876,6 +876,34 @@ gpstart
</codeblock>
</p>
</body>
<topic id="topic23a" xml:lang="en">
<title id="iz152239">Viewing Resource Group CPU/Memory Usage Per Host</title>
<body>
<p>The <codeph><xref href="../ref_guide/gp_toolkit.xml#perhost" type="topic" format="dita"
/></codeph>
<codeph>gp_toolkit</codeph> 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:</p>
<p>
<codeblock>=# SELECT * FROM gp_toolkit.gp_resgroup_status_per_host;
</codeblock>
</p>
</body>
</topic>
<topic id="topic23b" xml:lang="en">
<title id="iz152239">Viewing Resource Group CPU/Memory Usage Per Segment</title>
<body>
<p>The <codeph><xref href="../ref_guide/gp_toolkit.xml#perseg" type="topic" format="dita"
/></codeph>
<codeph>gp_toolkit</codeph> 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:</p>
<p>
<codeblock>=# SELECT * FROM gp_toolkit.gp_resgroup_status_per_segment;
</codeblock>
</p>
</body>
</topic>
</topic>
<topic id="topic25" xml:lang="en">
<title id="iz152239">Viewing the Resource Group Assigned to a Role</title>
......
......@@ -1544,7 +1544,7 @@
transaction submitted by a user against the limits configured for the user's resource group
before running the transaction.</p>
<p>You can use the <codeph>gp_resgroup_config</codeph> view to check the configuration of each
resource group. You can use the <codeph>gp_resgroup_status</codeph> view to display the
resource group. You can use the <codeph>gp_resgroup_status*</codeph> views to display the
current transaction status and resource usage of each resource group.</p>
<ul class="- topic/ul ">
<li id="ie193806" class="- topic/li ">
......@@ -1553,6 +1553,12 @@
<li id="ie193833" class="- topic/li ">
<xref href="#topic31x" type="topic" format="dita"/>
</li>
<li id="tperhost" class="- topic/li ">
<xref href="#perhost" type="topic" format="dita"/>
</li>
<li id="tperseg" class="- topic/li ">
<xref href="#perseg" type="topic" format="dita"/>
</li>
</ul>
</body>
<topic id="topic27x" xml:lang="en" ditaarch:DITAArchVersion="1.1"
......@@ -1750,6 +1756,220 @@
memory limit on each segment. The following example shows <codeph>memory_usage</codeph>
column output for an external component resource group for a single segment:
<codeblock>"1":{"used":11, "limit_granted":15}</codeblock></p>
<note>See the <codeph>gp_resgroup_status_per_host</codeph> and
<codeph>gp_resgroup_status_per_segment</codeph> views, described below, for
more user-friendly display of CPU and memory usage.</note>
</body>
</topic>
<topic id="perhost">
<title id="ie193152x">gp_resgroup_status_per_host</title>
<body>
<p>The <codeph><xref href="system_catalogs/gp_resgroup_status_per_host.xml"
type="topic" format="dita">gp_resgroup_status_per_host</xref></codeph>
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.</p>
<table id="fp141982">
<title class="- topic/title ">gp_resgroup_status_per_host view</title>
<tgroup cols="2" class="- topic/tgroup ">
<colspec colnum="1" colname="col1" colwidth="130pt" class="- topic/colspec "/>
<colspec colnum="2" colname="col2" colwidth="238pt" class="- topic/colspec "/>
<thead class="- topic/thead ">
<row class="- topic/row ">
<entry colname="col1" class="- topic/entry ">Column</entry>
<entry colname="col2" class="- topic/entry ">Description</entry>
</row>
</thead>
<tbody>
<row>
<entry colname="col1"><codeph>rsgname</codeph></entry>
<entry colname="col2">The name of the resource group.</entry>
</row>
<row>
<entry colname="col1"><codeph>groupid</codeph></entry>
<entry colname="col2">The ID of the resource group.</entry>
</row>
<row>
<entry colname="col1"><codeph>hostname</codeph></entry>
<entry colname="col2">The hostname of the segment host.</entry>
</row>
<row>
<entry colname="col1"><codeph>cpu</codeph></entry>
<entry colname="col2">The real-time CPU usage of the resource group on the
host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_used</codeph> </entry>
<entry colname="col2">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.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_available</codeph> </entry>
<entry colname="col2">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.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_quota_used</codeph> </entry>
<entry colname="col2">The real-time fixed memory usage for the resource
group on the host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_quota_available</codeph> </entry>
<entry colname="col2">The fixed memory available to the resource group
on the host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_quota_proposed</codeph> </entry>
<entry colname="col2">The total amount of fixed memory that Greenplum
Database has allotted to the resource group on the host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_shared_used</codeph> </entry>
<entry colname="col2">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.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_shared_available</codeph> </entry>
<entry colname="col2">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.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_shared_granted</codeph> </entry>
<entry colname="col2">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.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_shared_proposed</codeph> </entry>
<entry colname="col2">The total amount of group shared memory requested
by the resource group on the host.</entry>
</row>
</tbody>
</tgroup>
</table>
<p>The <codeph>memory_shared_granted</codeph> value may be less than
<codeph>memory_shared_proposed</codeph> if the cluster does not have enough
memory to allot. It may be greater than <codeph>memory_shared_proposed</codeph>
when global shared memory is in use by the resource group.
<codeph>memory_shared_granted</codeph> and <codeph>memory_shared_proposed</codeph>
should reach the same value over time.</p>
<p>Sample output for the <codeph>gp_resgroup_status_per_host</codeph> view:</p>
<codeblock> 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)</codeblock>
</body>
</topic>
<topic id="perseg">
<title id="ie193152x">gp_resgroup_status_per_segment</title>
<body>
<p>The <codeph><xref href="system_catalogs/gp_resgroup_status_per_segment.xml"
type="topic" format="dita">gp_resgroup_status_per_segment</xref></codeph>
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.</p>
<table id="fp141982">
<title class="- topic/title ">gp_resgroup_status_per_segment view</title>
<tgroup cols="2" class="- topic/tgroup ">
<colspec colnum="1" colname="col1" colwidth="130pt" class="- topic/colspec "/>
<colspec colnum="2" colname="col2" colwidth="238pt" class="- topic/colspec "/>
<thead class="- topic/thead ">
<row class="- topic/row ">
<entry colname="col1" class="- topic/entry ">Column</entry>
<entry colname="col2" class="- topic/entry ">Description</entry>
</row>
</thead>
<tbody>
<row>
<entry colname="col1"> <codeph>rsgname</codeph> </entry>
<entry colname="col4">The name of the resource group.</entry>
</row>
<row>
<entry colname="col1"> <codeph>groupid</codeph> </entry>
<entry colname="col4">The ID of the resource group.</entry>
</row>
<row>
<entry colname="col1"> <codeph>hostname</codeph> </entry>
<entry colname="col4">The hostname of the segment host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>segment_id</codeph> </entry>
<entry colname="col4">The content ID for a segment instance on the
segment host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>cpu</codeph> </entry>
<entry colname="col4">The real-time CPU usage of the resource group for the
segment instance on the host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_used</codeph> </entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_available</codeph> </entry>
<entry colname="col4">The unused fixed and shared memory for the resource
group for the segment instance on the host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_quota_used</codeph> </entry>
<entry colname="col4">The real-time fixed memory usage for the resource group
for the segment instance on the host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_quota_available</codeph> </entry>
<entry colname="col4">The fixed memory available to the resource group for
the segment instance on the host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_quota_proposed</codeph> </entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_shared_used</codeph> </entry>
<entry colname="col4">The group shared memory used by the resource
group for the segment instance on the host.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_shared_available</codeph> </entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_shared_granted</codeph> </entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1"> <codeph>memory_shared_proposed</codeph> </entry>
<entry colname="col4">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.</entry>
</row>
</tbody>
</tgroup>
</table>
<p>Query output for this view is similar to that of the
<codeph>gp_resgroup_status_per_host</codeph> view, and breaks out the CPU and
memory (used and available) for each segment instance on each host.</p>
</body>
</topic>
</topic>
......
......@@ -186,6 +186,8 @@
<topicref href="system_catalogs/gp_pgdatabase.xml"/>
<topicref href="system_catalogs/gp_resgroup_config.xml"/>
<topicref href="system_catalogs/gp_resgroup_status.xml"/>
<topicref href="system_catalogs/gp_resgroup_status_per_host.xml"/>
<topicref href="system_catalogs/gp_resgroup_status_per_segment.xml"/>
<topicref href="system_catalogs/gp_resqueue_status.xml"/>
<topicref href="system_catalogs/gp_stat_replication.xml"/>
<topicref href="system_catalogs/gp_segment_configuration.xml"/>
......
......@@ -22,6 +22,12 @@
<li>
<xref href="./gp_resgroup_status.xml#topic1" type="topic" format="dita"/>
</li>
<li>
<xref href="./gp_resgroup_status_per_host.xml#topic1" type="topic" format="dita"/>
</li>
<li>
<xref href="./gp_resgroup_status_per_segment.xml#topic1" type="topic" format="dita"/>
</li>
<li>
<xref href="./gp_resqueue_status.xml#topic1" type="topic" format="dita"/>
</li>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
<title id="fp141670">gp_resgroup_status_per_host</title>
<body>
<p>The <codeph>gp_toolkit.gp_resgroup_status_per_host</codeph> view allows administrators
to see current memory and CPU usage and allocation for each resource group on a
per-host basis.</p>
<p>Memory amounts are specified in MBs.</p>
<note>The <codeph>gp_resgroup_status_per_host</codeph> view is valid only when resource
group-based resource management is active.</note>
<table id="fp141982">
<title>gp_toolkit.gp_resgroup_status_per_host</title>
<tgroup cols="4">
<colspec colnum="1" colname="col1" colwidth="114pt"/>
<colspec colnum="2" colname="col2" colwidth="66pt"/>
<colspec colnum="3" colname="col3" colwidth="133.5pt"/>
<colspec colnum="4" colname="col4" colwidth="147pt"/>
<thead>
<row>
<entry colname="col1">column</entry>
<entry colname="col2">type</entry>
<entry colname="col3">references</entry>
<entry colname="col4">description</entry>
</row>
</thead>
<tbody>
<row>
<entry colname="col1">
<codeph>rsgname</codeph>
</entry>
<entry colname="col2">name</entry>
<entry colname="col3">pg_resgroup.rsgname</entry>
<entry colname="col4">The name of the resource group.</entry>
</row>
<row>
<entry colname="col1">
<codeph>groupid</codeph>
</entry>
<entry colname="col2">oid</entry>
<entry colname="col3">pg_resgroup.oid</entry>
<entry colname="col4">The ID of the resource group.</entry>
</row>
<row>
<entry colname="col1">
<codeph>hostname</codeph>
</entry>
<entry colname="col2">text</entry>
<entry colname="col3">gp_segment_configuration.hostname</entry>
<entry colname="col4">The hostname of the segment host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>cpu</codeph>
</entry>
<entry colname="col2">numeric</entry>
<entry colname="col3"></entry>
<entry colname="col4">The real-time CPU usage of the resource group on the
host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_used</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_available</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_quota_used</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">The real-time fixed memory usage for the resource
group on the host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_quota_available</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">The fixed memory available to the resource group
on the host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_quota_proposed</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">The total amount of fixed memory that Greenplum
Database has allotted to the resource group on the host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_shared_used</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_shared_available</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_shared_granted</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_shared_proposed</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">The total amount of group shared memory requested
by the resource group on the host.</entry>
</row>
</tbody>
</tgroup>
</table>
</body>
</topic>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
<title id="fp141670">gp_resgroup_status_per_segment</title>
<body>
<p>The <codeph>gp_toolkit.gp_resgroup_status_per_segment</codeph> view allows administrators
to see current memory and CPU usage and allocation for each resource group on a
per-host and per-segment basis.</p>
<p>Memory amounts are specified in MBs.</p>
<note>The <codeph>gp_resgroup_status_per_segment</codeph> view is valid only when resource
group-based resource management is active.</note>
<table id="fp141982">
<title>gp_toolkit.gp_resgroup_status_per_segment</title>
<tgroup cols="4">
<colspec colnum="1" colname="col1" colwidth="114pt"/>
<colspec colnum="2" colname="col2" colwidth="66pt"/>
<colspec colnum="3" colname="col3" colwidth="133.5pt"/>
<colspec colnum="4" colname="col4" colwidth="147pt"/>
<thead>
<row>
<entry colname="col1">column</entry>
<entry colname="col2">type</entry>
<entry colname="col3">references</entry>
<entry colname="col4">description</entry>
</row>
</thead>
<tbody>
<row>
<entry colname="col1">
<codeph>rsgname</codeph>
</entry>
<entry colname="col2">name</entry>
<entry colname="col3">pg_resgroup.rsgname</entry>
<entry colname="col4">The name of the resource group.</entry>
</row>
<row>
<entry colname="col1">
<codeph>groupid</codeph>
</entry>
<entry colname="col2">oid</entry>
<entry colname="col3">pg_resgroup.oid</entry>
<entry colname="col4">The ID of the resource group.</entry>
</row>
<row>
<entry colname="col1">
<codeph>hostname</codeph>
</entry>
<entry colname="col2">text</entry>
<entry colname="col3">gp_segment_configuration.hostname</entry>
<entry colname="col4">The hostname of the segment host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>segment_id</codeph>
</entry>
<entry colname="col2">smallint</entry>
<entry colname="col3">gp_segment_configuration.content</entry>
<entry colname="col4">The content ID for a segment instance on the
segment host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>cpu</codeph>
</entry>
<entry colname="col2">numeric</entry>
<entry colname="col3"></entry>
<entry colname="col4">The real-time CPU usage of the resource group for the
segment instance on the host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_used</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_available</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">The unused fixed and shared memory for the resource
group for the segment instance on the host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_quota_used</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">The real-time fixed memory usage for the resource group
for the segment instance on the host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_quota_available</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">The fixed memory available to the resource group for
the segment instance on the host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_quota_proposed</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_shared_used</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">The group shared memory used by the resource
group for the segment instance on the host.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_shared_available</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_shared_granted</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">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.</entry>
</row>
<row>
<entry colname="col1">
<codeph>memory_shared_proposed</codeph>
</entry>
<entry colname="col2">integer</entry>
<entry colname="col3"></entry>
<entry colname="col4">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.</entry>
</row>
</tbody>
</tgroup>
</table>
</body>
</topic>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册