6.17. Observing MMU Performance Impact with TRapstatThe trapstat command provides information about processor exceptions on UltraSPARC platforms. Since Translation Lookaside Buffer (TLB) misses are serviced in software on UltraSPARC microprocessors, TRapstat can also provide statistics about TLB misses. With the trapstat command, you can observe the number of TLB misses and the amount of time spent servicing TLB misses by using the -t and -T options. Also with trapstat, you can use the amount of time servicing TLB misses to approximate the potential gains you could make by using a larger page size or by moving to a platform that uses a microprocessor with a larger TLB. The -t option provides first-level summary statistics. The time spent servicing TLB misses is summarized in the lower-right corner; in the following example, 46.2% of the total execution time is spent servicing missesa significant portion of CPU time. sol9# trapstat -t 1 111 cpu m| itlb-miss %tim itsb-miss %tim | dtlb-miss %tim dtsb-miss %tim |%tim -----+--------------------------------+-------------------------------+---- 0 u| 1 0.0 0 0.0 | 2171237 45.7 0 0.0 |45.7 0 k| 2 0.0 0 0.0 | 3751 0.1 7 0.0 | 0.1 =====+================================+===============================+==== ttl | 3 0.0 0 0.0 | 2192238 46.2 7 0.0 |46.2 Miss detail is provided for TLB misses in both the instruction (itlb-miss) and data (dtlb-miss) portion of the address space. Data is also provided for user-mode (u) and kernel-mode (k) misses (the user-mode misses are of most interest since applications are likely to run in user mode). The -T option breaks down each page size. # trapstat -T 5 cpu m size| itlb-miss %tim itsb-miss %tim | dtlb-miss %tim dtsb-miss %tim |%tim ----------+-------------------------------+-------------------------------+---- 0 u 8k| 2760 0.1 3702 0.7 | 14239 0.7 4386 0.9 | 2.5 0 u 64k| 0 0.0 0 0.0 | 0 0.0 0 0.0 | 0.0 0 u 512k| 0 0.0 0 0.0 | 0 0.0 0 0.0 | 0.0 0 u 4m| 0 0.0 0 0.0 | 0 0.0 0 0.0 | 0.0 - - - - - + - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - + - - 0 k 8k| 681 0.1 0 0.0 | 183328 9.9 2992 0.9 |10.8 0 k 64k| 0 0.0 0 0.0 | 18 0.0 0 0.0 | 0.0 0 k 512k| 0 0.0 0 0.0 | 0 0.0 0 0.0 | 0.0 0 k 4m| 0 0.0 0 0.0 | 818 0.1 0 0.0 | 0.1 ==========+===============================+===============================+==== ttl | 3441 0.2 3702 0.7 | 198403 10.6 7378 1.8 |13.4 For further information on large pages and trapstat, see Chapter 13 in Solaris™ Internals. |