As many have stated on StackExchange and elsewhere, a typical kernel/mmu page size for Linux is 4 KiB. I have verified that this is the case on my OS/architecture (RHEL 6.6, Intel Xeon E5-2690).
Now among other things, the vmstat -s
command reports on "pages paged in" and "pages paged out", which are counters that start from 0 at boot time. I have confirmed that at any given moment, these values are exactly equal to the values found for the pgpgin
and pgpgout
entries in /proc/vmstat
(does vmstat command get them from /proc/vmstat
?). Other commands, and in particular sar -B
report pgpgin/s
and pgpgout/s
as Kibibytes paged in/out per second during a particular interval.
In recent tests, I have seen that pgpgin/s
and pgpgout/s
values from sar also correspond exactly to a rate calculated from vmstat values for a specified interval. This leads me to conclude that vmstat is reporting values for pages of 1 KiB in size. Thus the pgpgin/out
values of /proc/vmstat
are the number of KiB paged in/out since boot.
My questions are:
- Is this a valid conclusion, and
- If so, why do vmstat and other facilities report in 1 KiB pages instead of the 4 KiB pages that are the "common currency" of the OS and architecture? In particular, vmstat is saying "
pages paged in/out
", not "KiBs paged in/out
". This is confusing.