brintos

brintos / linux-shallow public Read only

0
0
Text · 3.0 KiB · 5704657 Raw
76 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3========================4VCPU Dispatch Statistics5========================6 7For Shared Processor LPARs, the POWER Hypervisor maintains a relatively8static mapping of the LPAR processors (vcpus) to physical processor9chips (representing the "home" node) and tries to always dispatch vcpus10on their associated physical processor chip. However, under certain11scenarios, vcpus may be dispatched on a different processor chip (away12from its home node).13 14/proc/powerpc/vcpudispatch_stats can be used to obtain statistics15related to the vcpu dispatch behavior. Writing '1' to this file enables16collecting the statistics, while writing '0' disables the statistics.17By default, the DTLB log for each vcpu is processed 50 times a second so18as not to miss any entries. This processing frequency can be changed19through /proc/powerpc/vcpudispatch_stats_freq.20 21The statistics themselves are available by reading the procfs file22/proc/powerpc/vcpudispatch_stats. Each line in the output corresponds to23a vcpu as represented by the first field, followed by 8 numbers.24 25The first number corresponds to:26 271. total vcpu dispatches since the beginning of statistics collection28 29The next 4 numbers represent vcpu dispatch dispersions:30 312. number of times this vcpu was dispatched on the same processor as last32   time333. number of times this vcpu was dispatched on a different processor core34   as last time, but within the same chip354. number of times this vcpu was dispatched on a different chip365. number of times this vcpu was dispatches on a different socket/drawer37   (next numa boundary)38 39The final 3 numbers represent statistics in relation to the home node of40the vcpu:41 426. number of times this vcpu was dispatched in its home node (chip)437. number of times this vcpu was dispatched in a different node448. number of times this vcpu was dispatched in a node further away (numa45   distance)46 47An example output::48 49    $ sudo cat /proc/powerpc/vcpudispatch_stats50    cpu0 6839 4126 2683 30 0 6821 18 051    cpu1 2515 1274 1229 12 0 2509 6 052    cpu2 2317 1198 1109 10 0 2312 5 053    cpu3 2259 1165 1088 6 0 2256 3 054    cpu4 2205 1143 1056 6 0 2202 3 055    cpu5 2165 1121 1038 6 0 2162 3 056    cpu6 2183 1127 1050 6 0 2180 3 057    cpu7 2193 1133 1052 8 0 2187 6 058    cpu8 2165 1115 1032 18 0 2156 9 059    cpu9 2301 1252 1033 16 0 2293 8 060    cpu10 2197 1138 1041 18 0 2187 10 061    cpu11 2273 1185 1062 26 0 2260 13 062    cpu12 2186 1125 1043 18 0 2177 9 063    cpu13 2161 1115 1030 16 0 2153 8 064    cpu14 2206 1153 1033 20 0 2196 10 065    cpu15 2163 1115 1032 16 0 2155 8 066 67In the output above, for vcpu0, there have been 6839 dispatches since68statistics were enabled. 4126 of those dispatches were on the same69physical cpu as the last time. 2683 were on a different core, but within70the same chip, while 30 dispatches were on a different chip compared to71its last dispatch.72 73Also, out of the total of 6839 dispatches, we see that there have been746821 dispatches on the vcpu's home node, while 18 dispatches were75outside its home node, on a neighbouring chip.76