System Administration Guide: Advanced Administration

ProcedureHow to Check Kernel Memory Allocation (sar -k)

  1. Use the sar -k command to report on the following activities of the Kernel Memory Allocator (KMA).


    $ sar -k
    00:00:00 sml_mem   alloc  fail  lg_mem   alloc   fail  ovsz_alloc  fail
    01:00:00 2523136 1866512     0 18939904 14762364    0      360448     0
    02:00:02 2523136 1861724     0 18939904 14778748    0      360448     0

Example 13–9 Checking Kernel Memory Allocation (sar -k)

The following is an abbreviated example of sar -k output.


$ sar -k

SunOS balmyday 5.10 s10_51 sun4u    03/18/2004

00:00:04 sml_mem   alloc  fail  lg_mem   alloc  fail  ovsz_alloc  fail
01:00:00 6119744 4852865     0 60243968 54334808   156     9666560     0
02:00:01 6119744 4853057     0 60243968 54336088   156     9666560     0
03:00:00 6119744 4853297     0 60243968 54335760   156     9666560     0
04:00:00 6119744 4857673     0 60252160 54375280   156     9666560     0
05:00:00 6119744 4858097     0 60252160 54376240   156     9666560     0
06:00:00 6119744 4858289     0 60252160 54375608   156     9666560     0
07:00:00 6119744 4858793     0 60252160 54442424   156     9666560     0
08:00:00 6119744 4858985     0 60252160 54474552   156     9666560     0
08:20:00 6119744 4858169     0 60252160 54377400   156     9666560     0
08:40:01 6119744 4857345     0 60252160 54376880   156     9666560     0
09:00:00 6119744 4859433     0 60252160 54539752   156     9666560     0
09:20:00 6119744 4858633     0 60252160 54410920   156     9666560     0
09:40:00 6127936 5262064     0 60530688 55619816   156     9666560     0
10:00:00 6545728 5823137     0 62996480 58391136   156     9666560     0
10:20:00 6545728 5758997     0 62996480 57907400   156     9666560     0
10:40:00 6734144 6035759     0 64389120 59743064   156    10493952     0
11:00:00 6996288 6394872     0 65437696 60935936   156    10493952     0

Average  6258044 5150556     0 61138340 55609004   156     9763900     0

The following table describes the output from the -k option.

Field Name 

Description 

sml_mem

The amount of memory, in bytes, that the KMA has available in the small memory request pool. In this pool, here a small request is less than 256 bytes. 

alloc

The amount of memory, in bytes, that the KMA has allocated from its small memory request pool to small memory requests. 

fail

The number of requests for small amounts of memory that failed. 

lg_mem

The amount of memory, in bytes, that the KMA has available in the large memory request pool. In this pool, a large request is from 512 bytes to 4 Kbytes. 

alloc

The amount of memory, in bytes, that the KMA has allocated from its large memory request pool to large memory requests. 

fail

The number of failed requests for large amounts of memory. 

ovsz_alloc

The amount of memory that is allocated for oversized requests, which are requests that are greater than 4 Kbytes. These requests are satisfied by the page allocator. Thus, there is no pool. 

fail

The number of failed requests for oversized amounts of memory.