- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitf92c854
committed
Make pg_stat_io count IOs as bytes instead of blocks for some operations
Currently in pg_stat_io view, IOs are counted as blocks of sizeBLCKSZ. There are two limitations with this design:* The actual number of I/O requests sent to the kernel is lower becauseI/O requests may be merged before being sent. Additionally, it givesthe impression that all I/Os are done in block size, which shadows thebenefits of merging I/O requests.* Some patches are under work to extend pg_stat_io for the tracking ofoperations that may not be linked to the block size. For example, WALread IOs are done in variable bytes and it is not possible to correctlyshow these IOs in pg_stat_io view, and we want to keep all this data ina single system view rather than spread it across multiple relations toease monitoring.WaitReadBuffers() can now be tracked as a single read operationworth N blocks. Same for ExtendBufferedRelShared() andExtendBufferedRelLocal() for extensions.Three columns are added to pg_stat_io for reads, writes and extensionsfor the byte calculations. op_bytes, which was always hardcoded toBLCKSZ, is removed. IO backend statistics are updated to reflect thesechanges.Bump catalog version.Author: Nazir Bilal YavuzReviewed-by: Bertrand Drouvot, Melanie PlagemanDiscussion:https://postgr.es/m/CAN55FZ0oqxBaaHAEsj=xFqkzE3n5P=3RA1V_igXwL-RV7QRzyw@mail.gmail.com1 parentb4a07f5 commitf92c854
File tree
12 files changed
+164
-71
lines changed- doc/src/sgml
- src
- backend
- catalog
- storage
- buffer
- smgr
- utils
- activity
- adt
- include
- catalog
- test/regress/expected
12 files changed
+164
-71
lines changedLines changed: 32 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2692 | 2692 |
| |
2693 | 2693 |
| |
2694 | 2694 |
| |
2695 |
| - | |
2696 |
| - | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
2697 | 2707 |
| |
2698 | 2708 |
| |
2699 | 2709 |
| |
| |||
2716 | 2726 |
| |
2717 | 2727 |
| |
2718 | 2728 |
| |
2719 |
| - | |
2720 |
| - | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
2721 | 2741 |
| |
2722 | 2742 |
| |
2723 | 2743 |
| |
| |||
2740 | 2760 |
| |
2741 | 2761 |
| |
2742 | 2762 |
| |
2743 |
| - | |
2744 |
| - | |
| 2763 | + | |
| 2764 | + | |
2745 | 2765 |
| |
2746 | 2766 |
| |
2747 | 2767 |
| |
| |||
2766 | 2786 |
| |
2767 | 2787 |
| |
2768 | 2788 |
| |
2769 |
| - | |
2770 |
| - | |
| 2789 | + | |
2771 | 2790 |
| |
2772 | 2791 |
| |
2773 | 2792 |
| |
2774 | 2793 |
| |
2775 | 2794 |
| |
2776 | 2795 |
| |
2777 | 2796 |
| |
2778 |
| - | |
| 2797 | + | |
2779 | 2798 |
| |
2780 | 2799 |
| |
2781 |
| - | |
2782 |
| - | |
| 2800 | + | |
2783 | 2801 |
| |
2784 | 2802 |
| |
2785 | 2803 |
| |
2786 | 2804 |
| |
2787 | 2805 |
| |
2788 | 2806 |
| |
2789 | 2807 |
| |
2790 |
| - | |
2791 |
| - | |
2792 |
| - | |
2793 |
| - | |
| 2808 | + | |
2794 | 2809 |
| |
2795 | 2810 |
| |
2796 |
| - | |
2797 |
| - | |
2798 |
| - | |
2799 |
| - | |
| 2811 | + | |
| 2812 | + | |
2800 | 2813 |
| |
2801 | 2814 |
| |
2802 | 2815 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1156 | 1156 |
| |
1157 | 1157 |
| |
1158 | 1158 |
| |
| 1159 | + | |
1159 | 1160 |
| |
1160 | 1161 |
| |
| 1162 | + | |
1161 | 1163 |
| |
1162 | 1164 |
| |
1163 | 1165 |
| |
1164 | 1166 |
| |
| 1167 | + | |
1165 | 1168 |
| |
1166 |
| - | |
1167 | 1169 |
| |
1168 | 1170 |
| |
1169 | 1171 |
| |
|
Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1165 | 1165 |
| |
1166 | 1166 |
| |
1167 | 1167 |
| |
1168 |
| - | |
| 1168 | + | |
1169 | 1169 |
| |
1170 | 1170 |
| |
1171 | 1171 |
| |
| |||
1515 | 1515 |
| |
1516 | 1516 |
| |
1517 | 1517 |
| |
1518 |
| - | |
| 1518 | + | |
1519 | 1519 |
| |
1520 | 1520 |
| |
1521 | 1521 |
| |
| |||
2073 | 2073 |
| |
2074 | 2074 |
| |
2075 | 2075 |
| |
2076 |
| - | |
| 2076 | + | |
2077 | 2077 |
| |
2078 | 2078 |
| |
2079 | 2079 |
| |
| |||
2429 | 2429 |
| |
2430 | 2430 |
| |
2431 | 2431 |
| |
2432 |
| - | |
| 2432 | + | |
2433 | 2433 |
| |
2434 | 2434 |
| |
2435 | 2435 |
| |
| |||
3891 | 3891 |
| |
3892 | 3892 |
| |
3893 | 3893 |
| |
3894 |
| - | |
| 3894 | + | |
3895 | 3895 |
| |
3896 | 3896 |
| |
3897 | 3897 |
| |
| |||
4530 | 4530 |
| |
4531 | 4531 |
| |
4532 | 4532 |
| |
4533 |
| - | |
| 4533 | + | |
4534 | 4534 |
| |
4535 | 4535 |
| |
4536 | 4536 |
| |
| |||
6037 | 6037 |
| |
6038 | 6038 |
| |
6039 | 6039 |
| |
6040 |
| - | |
| 6040 | + | |
6041 | 6041 |
| |
6042 | 6042 |
| |
6043 | 6043 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
255 | 255 |
| |
256 | 256 |
| |
257 | 257 |
| |
258 |
| - | |
| 258 | + | |
259 | 259 |
| |
260 | 260 |
| |
261 | 261 |
| |
| |||
279 | 279 |
| |
280 | 280 |
| |
281 | 281 |
| |
282 |
| - | |
| 282 | + | |
| 283 | + | |
283 | 284 |
| |
284 | 285 |
| |
285 | 286 |
| |
| |||
419 | 420 |
| |
420 | 421 |
| |
421 | 422 |
| |
422 |
| - | |
| 423 | + | |
423 | 424 |
| |
424 | 425 |
| |
425 | 426 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1401 | 1401 |
| |
1402 | 1402 |
| |
1403 | 1403 |
| |
1404 |
| - | |
| 1404 | + | |
1405 | 1405 |
| |
1406 | 1406 |
| |
1407 | 1407 |
| |
| |||
1796 | 1796 |
| |
1797 | 1797 |
| |
1798 | 1798 |
| |
1799 |
| - | |
| 1799 | + | |
1800 | 1800 |
| |
1801 | 1801 |
| |
1802 | 1802 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
| 68 | + | |
| 69 | + | |
68 | 70 |
| |
69 | 71 |
| |
70 | 72 |
| |
|
Lines changed: 17 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
26 | 33 |
| |
27 | 34 |
| |
28 | 35 |
| |
| |||
66 | 73 |
| |
67 | 74 |
| |
68 | 75 |
| |
69 |
| - | |
| 76 | + | |
| 77 | + | |
70 | 78 |
| |
71 | 79 |
| |
72 | 80 |
| |
73 | 81 |
| |
| 82 | + | |
74 | 83 |
| |
75 | 84 |
| |
76 | 85 |
| |
| |||
79 | 88 |
| |
80 | 89 |
| |
81 | 90 |
| |
| 91 | + | |
82 | 92 |
| |
83 | 93 |
| |
84 | 94 |
| |
| 95 | + | |
85 | 96 |
| |
86 | 97 |
| |
87 | 98 |
| |
| |||
114 | 125 |
| |
115 | 126 |
| |
116 | 127 |
| |
117 |
| - | |
| 128 | + | |
118 | 129 |
| |
119 | 130 |
| |
120 | 131 |
| |
| |||
153 | 164 |
| |
154 | 165 |
| |
155 | 166 |
| |
156 |
| - | |
| 167 | + | |
157 | 168 |
| |
158 | 169 |
| |
159 | 170 |
| |
| |||
219 | 230 |
| |
220 | 231 |
| |
221 | 232 |
| |
| 233 | + | |
| 234 | + | |
| 235 | + | |
222 | 236 |
| |
223 | 237 |
| |
224 | 238 |
| |
|
0 commit comments
Comments
(0)