PGXC_OBS_IO_SCHEDULER_STATS
Queries 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.
Column |
Type |
Description |
---|---|---|
node_name |
text |
Node name. |
io_type |
char |
Type of I/O operation, including:
|
current_bps |
int8 |
Current bandwidth rate, in KB/s. |
best_bps |
int8 |
Best bandwidth rate achieved recently, in KB/s. |
waiting_request_num |
int |
Number of queued requests currently waiting. |
mean_request_size |
int8 |
Average length of requests processed recently, in KB. |
total_token_num |
int |
Total number of I/O tokens. |
available_token_num |
int |
Number of available I/O tokens. |
total_worker_num |
int |
Total number of working threads. |
idle_worker_num |
int |
Number of idle working threads. |
Example
- Query statistics about read requests of OBS I/O Scheduler on each node:
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 current_bps is equal to best_bps. Take dn_6003_6004 as an example. You can see that there are queuing requests on the current DN. The value of total_token_num is the same as that of available_token_num, indicating that the I/O scheduler has not started to process these requests when the view is queried.
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
- Wait for a while and initiate the query again.
At this time, there is no queuing request in the queue, and available_token_num is equal to total_token_num, indicating that the IO Scheduler has processed all requests and no new request needs to be processed. However, the value of current_bps is not 0 because the period for collecting bps statistics is 3 seconds, and the result was generated 3 seconds ago.
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
- After a short period of time, the query result is as follows. The value of current_bps changes to 0.
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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.