Understanding vmstat and sar Output

The units used by the vmstat and sar commands are not consistent. Sometimes they use pages, sar tends to use blocks, where a block is 512 bytes, and vmstat tends to use Kbytes defined as 1024 bytes. Page sizes are not constant either. As described in “Memory Management Unit Designs” on page 266, the original SPARC systems used 8-Kbyte pages. Designs then switched to 4 Kbytes for a long time, the same size used by Intel x86 and other CPU designs. With UltraSPARC there was a return to 8 Kbytes. A larger page reduces MMU activity, halves the number of page faults required to load a given amount of data, and saves kernel memory by halving the size of tables used to keep track of pages. It also wastes RAM by rounding ...

Get Sun Performance and Tuning: Java™ and the Internet, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.