New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct mem.vmstat.pgsteal* mem.vmstat.pgscan metrics on RHEL7 and Fedora 25 #276
Comments
I am not sure how many of these missing metrics in /proc/vmstat are generally useful in addition to the pgscan and pgsteal ones. Wrote a one line script to see /proc/vmstat metrics listed are missing from PCP mem.vmstat.*: for i in On Fedora 25: On RHEL7: $ for i in |
The way that src/pmdas/linux/proc_vmstat.c is written the metrics are hard-coded in C in the vmstat_fields[] array. When it scans /proc/vmstat, it does a linear search against the vmstat_fields[] list to deposit parsed fields in the global _proc_vmstat_t structure. It's not particularly efficient, nor flexible. It could instead generate the vmstat pmns entries dynamically from the actual contents of /proc/vmstat, and pass every value out as an int64_t, and ditch all the hard-coded proc_vmstat_t etc. machinery. |
On Fedora 27 with PCP 3.12.2 / kernel 4.13 pgscan/pgsteal metrics are missing completely. With PCP 3.12.2 we have: $ pminfo | grep -E '(pgscan|pgsteal)' | sort And this works with RHEL 6 which has: $ cat /proc/vmstat | grep -E '(pgscan|pgsteal)' | sort And RHEL 7 which has: $ cat /proc/vmstat | grep -E '(pgscan|pgsteal)' | sort However, on Fedora 27 / kernel 4.13 we have: $ cat /proc/vmstat | grep -E '(pgscan|pgsteal)' | sort This means, for example, that stats corresponding to sar -B are impossible to generate with PCP. Below are few somewhat relevant links for reference: https://github.com/torvalds/linux/blob/master/include/linux/vm_event_item.h Please update the PMDA for latest kernel. Thanks. |
Adds mem.vmstat.pgscan_{direct,direct_throttle,kswapd} and mem.vmstat.pgsteal_{direct,kswapd}. Test 821 is extended with new data to cover these cases - thanks Marko. Resolves github issue #276.
PCP on x86_64 RHEL7 and Fedora 25 lists the following pgsteal metrics:
$ pminfo mem.vmstat|grep pgsteal
mem.vmstat.pgsteal_dma
mem.vmstat.pgsteal_dma32
mem.vmstat.pgsteal_high
mem.vmstat.pgsteal_movable
mem.vmstat.pgsteal_normal
However, doing pmval for each of these pgsteal metrics on RHEL7 and F25 return "No values available". Those metrics do not appear to line up with what /proc/vmstat provide for RHEL7 and F25:
RHEL7:
$ more /proc/vmstat |grep pgsteal
pgsteal_kswapd_dma 0
pgsteal_kswapd_dma32 0
pgsteal_kswapd_normal 0
pgsteal_kswapd_movable 0
pgsteal_direct_dma 0
pgsteal_direct_dma32 0
pgsteal_direct_normal 0
pgsteal_direct_movable 0
F25:
$ more /proc/vmstat |grep pgsteal
pgsteal_kswapd 3543984
pgsteal_direct 290756
For Fedora 25 the pgscan metrics don't match with what is available in /proc/vmstat:
[wcohen@santana perf]$ pminfo mem.vmstat|grep pgscan
mem.vmstat.pgscan_direct_dma
mem.vmstat.pgscan_direct_dma32
mem.vmstat.pgscan_direct_high
mem.vmstat.pgscan_direct_movable
mem.vmstat.pgscan_direct_normal
mem.vmstat.pgscan_kswapd_dma
mem.vmstat.pgscan_kswapd_dma32
mem.vmstat.pgscan_kswapd_high
mem.vmstat.pgscan_kswapd_movable
mem.vmstat.pgscan_kswapd_normal
[wcohen@santana perf]$ more /proc/vmstat |grep pgscan
pgscan_kswapd 3679442
pgscan_direct 424948
pgscan_direct_throttle 0
The text was updated successfully, but these errors were encountered: