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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.