Files
doc-exports/docs/dws/dev/dws_04_1236.html
luhuayi 177cd61a57 DWS DEVG 910.211 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: luhuayi <luhuayi@huawei.com>
Co-committed-by: luhuayi <luhuayi@huawei.com>
2025-05-05 07:44:03 +00:00

136 lines
16 KiB
HTML

<a name="EN-US_TOPIC_0000001839889366"></a><a name="EN-US_TOPIC_0000001839889366"></a>
<h1 class="topictitle1">PGXC_OBS_IO_SCHEDULER_PERIODIC_STATS</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001839889366__p1858952803611"><strong id="EN-US_TOPIC_0000001839889366__b9468661123">PGXC_OBS_IO_SCHEDULER_PERIODIC_STATS</strong> provides statistics on the number of requests and flow control information for different types of OBS I/O Scheduler requests, including read, write, and file operations. This system view is supported only by clusters of version 9.1.0 or later.</p>
<p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p14755945428">The first query result shows the statistics from the cluster startup to the query time, with detailed columns listed in the table below.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_table202191561666" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PGXC_OBS_IO_SCHEDULER_PERIODIC_STATS columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row12539569612"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.2.4.1.1"><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p192532561619"><strong id="EN-US_TOPIC_0000001839889366__b114350671843819">Column</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.2.4.1.2"><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p192539564615">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.2.4.1.3"><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p1125312561764">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row42536567617"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p825345610616">node_name</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p3253256561">Name</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p142541561160">Name of a CN or DN, for example, <strong id="EN-US_TOPIC_0000001839889366__b081510119105">dn_6001_6002</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row32541456063"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p15254125613615">io_type</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p525414568619">Char</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p193873155214">Type of I/O operation, including:</p>
<ul id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_ul12546427528"><li id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_li15254134210524"><strong id="EN-US_TOPIC_0000001839889366__b3577125241011">R</strong>: read</li><li id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_li1125414427521"><strong id="EN-US_TOPIC_0000001839889366__b98309119">W</strong>: write</li><li id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_li225484220522"><strong id="EN-US_TOPIC_0000001839889366__b640187171114">S</strong>: file operation</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row725410561616"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p92541356468">recent_throttled_req_num</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p20254356566">Int</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p1525419561967">Number of times flow control was applied between two query views.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row22548564618"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p1325415567615">total_throttled_req_num</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p15254155612616">Int</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p142542561612">Total number of times flow control was applied.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row22541056368"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p1425417561765">last_throttled_dur(s)</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p325425616610">INT8</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p025419567613">Time interval since the last occurrence of flow control.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row1425419561463"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p42541156563">waiting_req_num</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p825585613614">Int</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p1725595620615">Number of queued requests currently waiting.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row1125518566618"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p525517561069">mean_tps</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p13255175619611">numeric(7,2)</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p13255165611618">Average TPS (transactions per second) between two query views.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row15255185618610"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p9255556469">mean_req_size(KB)</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p122556565615">INT8</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p1525555617615">Average length of requests between two query views, in KB.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row1725513560616"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p92556561265">mean_req_latency(ms)</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p625545618613">INT8</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p202556567614">Average latency of requests between two query views, in ms.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row525516561965"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p142551656968">max_req_latency(ms)</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p12551056666">INT8</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p3256456263">Maximum latency of requests before two query views, in ms.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row1325675619610"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p2256656869">mean_bps(KB/s)</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p1486192714502">INT8</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p72567561667">Average read or write speed between two query views, in KB/s.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_row7256135612611"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p1725695616615">duration(s)</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p425616569610">Int</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p19256175620611">Time interval between two query views, in seconds.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_section5930174820101"><h4 class="sectiontitle">Example</h4><div class="p" id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p205031176173">Run the <strong id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_b1324603710518">SELECT * FROM pgxc_obs_io_scheduler_periodic_stats</strong> statement to query the view content. The following is an example of the query result:<pre class="screen" id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_screen34889521162">SELECT * FROM pgxc_obs_io_scheduler_periodic_stats;
node_name | io_type | recent_throttled_req_num | total_throttled_req_num | last_throttled_dur(s) | waiting_req_num | mean_tps | mean_req_size(KB) | mean_req_latency(ms) | max_req_latency(ms) | mean_bps(KB/s) | duration(s)
--------------+---------+--------------------------+-------------------------+-----------------------+-----------------+----------+-------------------+----------------------+---------------------+----------------+-------------
dn_6001_6002 | S | 0 | 0 | 0 | 0 | 0.00 | 0 | 0 | 0 | 0 | 155
dn_6001_6002 | R | 0 | 0 | 0 | 0 | 0.00 | 0 | 0 | 0 | 0 | 155
dn_6001_6002 | W | 0 | 0 | 0 | 0 | 0.00 | 0 | 0 | 0 | 0 | 155
cn_5001 | S | 0 | 0 | 0 | 0 | .03 | 0 | 207 | 519 | 0 | 155
cn_5001 | R | 0 | 0 | 0 | 0 | 0.00 | 0 | 0 | 0 | 0 | 155
cn_5001 | W | 0 | 0 | 0 | 0 | .01 | 0 | 288 | 288 | 0 | 155
(6 rows)</pre>
</div>
<p id="EN-US_TOPIC_0000001839889366__p61842034125913">To display <strong id="EN-US_TOPIC_0000001839889366__b52687544313">0</strong> before the decimal point in the value of <strong id="EN-US_TOPIC_0000001839889366__b1521411585316">mean_tps</strong>, set the <strong id="EN-US_TOPIC_0000001839889366__b1881314081">display_leading_zero</strong> option in the <strong id="EN-US_TOPIC_0000001839889366__b1757392610818">behavior_compat_options</strong> parameter.</p>
<div class="p" id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_p586991918588">Run the <strong id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_b04994377214">select * from pgxc_obs_io_scheduler_periodic_stats</strong> statement. The following information is displayed:<pre class="screen" id="EN-US_TOPIC_0000001839889366__en-us_topic_0000001666526750_screen2086911910588">SELECT * FROM pgxc_obs_io_scheduler_periodic_stats;
node_name | io_type | recent_throttled_req_num | total_throttled_req_num | last_throttled_dur(s) | waiting_req_num | mean_tps | mean_req_size(KB) | mean_req_latency(ms) | max_req_latency(ms) | mean_bps(KB/s) | duration(s)
--------------+---------+--------------------------+-------------------------+-----------------------+-----------------+----------+-------------------+----------------------+---------------------+----------------+-------------
dn_6001_6002 | S | 0 | 0 | 0 | 0 | 0.36 | 0 | 132 | 326 | 0 | 177
dn_6001_6002 | R | 0 | 0 | 0 | 0 | 0.00 | 0 | 0 | 0 | 0 | 177
dn_6001_6002 | W | 0 | 0 | 0 | 0 | 0.00 | 0 | 0 | 0 | 0 | 177
cn_5001 | S | 0 | 0 | 0 | 0 | 0.00 | 0 | 0 | 0 | 0 | 177
cn_5001 | R | 0 | 0 | 0 | 0 | 0.00 | 0 | 0 | 0 | 0 | 177
cn_5001 | W | 0 | 0 | 0 | 0 | 0.00 | 0 | 0 | 0 | 0 | 177
</pre>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0639.html">System Views</a></div>
</div>
</div>