forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: luhuayi <luhuayi@huawei.com> Co-committed-by: luhuayi <luhuayi@huawei.com>
120 lines
15 KiB
HTML
120 lines
15 KiB
HTML
<a name="EN-US_TOPIC_0000001839730630"></a><a name="EN-US_TOPIC_0000001839730630"></a>
|
|
|
|
<h1 class="topictitle1">PGXC_OBS_IO_SCHEDULER_STATS</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p376694143615">PGXC_OBS_IO_SCHEDULER_STATS displays the latest real-time statistics about read/write requests of the OBS I/O Scheduler. This system view is supported only by clusters of version 9.1.0 or later.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_t73a6cdcc6f5f407295f7a10661f77795" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PGXC_OBS_IO_SCHEDULER_STATS columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_ra23f56ada4d84851b753595c22721838"><th align="left" class="cellrowborder" valign="top" width="25.322532253225322%" id="mcps1.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_a6685836e60f04997906362bfd62f3a42"><strong id="EN-US_TOPIC_0000001839730630__b80315099743818">Column</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.181618161816182%" id="mcps1.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_ad16ba1201c9a4d72ade48d71c3788f58">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="58.49584958495849%" id="mcps1.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_a08e09097ed544fedbb34f3242c05c354">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_r91b8d572acb64edea74d520b11c61878"><td class="cellrowborder" valign="top" width="25.322532253225322%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p19444192134512">node_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.181618161816182%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p84440213456">Text</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.49584958495849%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p844311204511">Node name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_r27e7e2b516a24187979572cc46a0abfa"><td class="cellrowborder" valign="top" width="25.322532253225322%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p114431828453">io_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.181618161816182%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p244282124516">Char</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.49584958495849%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p147225175719">Type of I/O operation, including:</p>
|
|
<ul id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_ul065219100572"><li id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_li10857181414572"><strong id="EN-US_TOPIC_0000001839730630__b310619511715">r</strong>: read.</li><li id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_li1865221013579"><strong id="EN-US_TOPIC_0000001839730630__b9484133613311">w</strong>: write.</li><li id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_li1439520554304"><strong id="EN-US_TOPIC_0000001839730630__b161554119315">s</strong>: file operation.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_r8967ebf498a743a7a5366f783afd31e8"><td class="cellrowborder" valign="top" width="25.322532253225322%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p144116215452">current_bps</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.181618161816182%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p8441182184518">INT8</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.49584958495849%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p154416211458">Current bandwidth rate, in KB/s.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_rfc403dd65527452fbcce8f5e27bfceb4"><td class="cellrowborder" valign="top" width="25.322532253225322%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p155849324181">best_bps</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.181618161816182%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p944013218456">INT8</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.49584958495849%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p44391523458">Best bandwidth rate achieved recently, in KB/s.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_r41c4110e86234278857ff803f93d6d58"><td class="cellrowborder" valign="top" width="25.322532253225322%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p143911218454">waiting_request_num</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.181618161816182%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p443818217455">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.49584958495849%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p94387244512">Number of queued requests currently waiting.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_r43e04e86d21c41deb32739bfd686c30c"><td class="cellrowborder" valign="top" width="25.322532253225322%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p18438825454">mean_request_size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.181618161816182%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p184376210450">INT8</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.49584958495849%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p4437162124517">Average length of requests processed recently, in KB.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_r9087e017fb5f4f549a5bd6721d54d1cf"><td class="cellrowborder" valign="top" width="25.322532253225322%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p114361926450">total_token_num</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.181618161816182%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p174365244515">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.49584958495849%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p144356210451">Total number of I/O tokens.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_row46937483372"><td class="cellrowborder" valign="top" width="25.322532253225322%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p184356218459">available_token_num</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.181618161816182%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p184343274512">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.49584958495849%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p154341124452">Number of available I/O tokens.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_row97268541375"><td class="cellrowborder" valign="top" width="25.322532253225322%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p1443382174513">total_worker_num</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.181618161816182%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p18433102124519">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.49584958495849%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p14432725452">Total number of working threads.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_row369717591375"><td class="cellrowborder" valign="top" width="25.322532253225322%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p843252124520">idle_worker_num</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.181618161816182%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p94319244515">Int</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.49584958495849%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_p1043114244516">Number of idle working threads.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_section1899417210353"><h4 class="sectiontitle">Example</h4><ol id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_ol56721691109"><li id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_li6672791409"><span>Query statistics about read requests of OBS I/O Scheduler on each node:</span><p><pre class="screen" id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_screen6514150712">SELECT * FROM pgxc_obs_io_scheduler_stats WHERE io_type = 'r' ORDER BY node_name;
|
|
|
|
node_name | io_type | current_bps | best_bps | waiting_request_num | mean_request_size | total_token_num | available_token_num | total_worker_num | idle_worker_num
|
|
--------------+---------+-------------+----------+---------------------+-------------------+-----------------+---------------------+------------------+-----------------
|
|
dn_6001_6002 | r | 26990 | 26990 | 0 | 215 | 18 | 16 | 12 | 10
|
|
dn_6003_6004 | r | 21475 | 21475 | 10 | 190 | 30 | 30 | 20 | 20
|
|
dn_6005_6006 | r | 12384 | 12384 | 36 | 133 | 30 | 27 | 20 | 17</pre>
|
|
<p id="EN-US_TOPIC_0000001839730630__p126313618476">According to the result, this is a snapshot of the statistics at a certain time point when the current I/O scheduler reads I/Os. At this time, the bandwidth is increasing, and <strong id="EN-US_TOPIC_0000001839730630__b77423537272141">current_bps</strong> is equal to <strong id="EN-US_TOPIC_0000001839730630__b73442236372141">best_bps</strong>. Take <strong id="EN-US_TOPIC_0000001839730630__b3564105619554">dn_6003_6004</strong> as an example. You can see that there are queuing requests on the current DN. The value of <strong id="EN-US_TOPIC_0000001839730630__b17812105095516">total_token_num</strong> is the same as that of <strong id="EN-US_TOPIC_0000001839730630__b198132050155516">available_token_num</strong>, indicating that the I/O scheduler has not started to process these requests when the view is queried.</p>
|
|
</p></li><li id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_li8672394010"><span>Wait for a while and initiate the query again.</span><p><pre class="screen" id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_screen713822517115">SELECT * FROM pgxc_obs_io_scheduler_stats WHERE io_type = 'r' ORDER BY node_name;
|
|
|
|
node_name | io_type | current_bps | best_bps | waiting_request_num | mean_request_size | total_token_num | available_token_num | total_worker_num | idle_worker_num
|
|
--------------+---------+-------------+----------+---------------------+-------------------+-----------------+---------------------+------------------+-----------------
|
|
dn_6001_6002 | r | 13228 | 26990 | 0 | 609 | 18 | 18 | 12 | 12
|
|
dn_6003_6004 | r | 15717 | 21475 | 0 | 622 | 30 | 30 | 20 | 20
|
|
dn_6005_6006 | r | 18041 | 21767 | 0 | 609 | 30 | 30 | 20 | 20</pre>
|
|
<p id="EN-US_TOPIC_0000001839730630__lines152015863218">When the queue is empty and the value of <strong id="EN-US_TOPIC_0000001839730630__b194035812584">available_token_num</strong> is equal to that of <strong id="EN-US_TOPIC_0000001839730630__b08338525911">total_token_num</strong>, it indicates that the I/O scheduler has finished processing all requests and there are no new requests in line. The <strong id="EN-US_TOPIC_0000001839730630__b3523102510594">current_bps</strong> value is not <strong id="EN-US_TOPIC_0000001839730630__b12710528135918">0</strong> because it represents the average bandwidth (in bit/s) over a three-second period. Therefore, the displayed value reflects the data from three seconds ago.</p>
|
|
</p></li></ol><ol start="3" id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_ol1267149504"><li id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_li166711894014"><span>After a short period of time, the query result is as follows. The value of <strong id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_b1445319205117">current_bps</strong> changes to <strong id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_b26512298518">0</strong>.</span><p><pre class="screen" id="EN-US_TOPIC_0000001839730630__en-us_topic_0000001583447540_screen175049401405">SELECT * FROM pgxc_obs_io_scheduler_stats WHERE io_type = 'r' ORDER BY node_name;
|
|
|
|
node_name | io_type | current_bps | best_bps | waiting_request_num | mean_request_size | total_token_num | available_token_num | total_worker_num | idle_worker_num
|
|
--------------+---------+-------------+----------+---------------------+-------------------+-----------------+---------------------+------------------+-----------------
|
|
dn_6001_6002 | r | 0 | 26990 | 0 | 609 | 18 | 18 | 12 | 12
|
|
dn_6003_6004 | r | 0 | 21475 | 0 | 622 | 30 | 30 | 20 | 20
|
|
dn_6005_6006 | r | 0 | 21767 | 0 | 609 | 30 | 30 | 20 | 20</pre>
|
|
</p></li></ol>
|
|
</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>
|
|
|