Assessing disk performance with the vmstat command

To prove that the system is I/O bound, it is better to use the iostat command.

However, the vmstat command could point to that direction by looking at the wa column, as discussed in vmstat command. Other indicators for I/O bound are:

  • The disk xfer part of the vmstat output
    To display a statistic about the logical disks (a maximum of four disks is allowed), use the following command:
    # vmstat hdisk0 hdisk1 1 8
    kthr     memory             page              faults        cpu     disk xfer
    ----  ----------  ----------------------- ------------ ----------- ------
    r  b   avm   fre  re  pi  po  fr  sr  cy  in   sy  cs  us sy id wa  1 2 3 4
    0  0  3456 27743   0   0   0   0   0   0 131  149  28  0  1 99  0  0 0
    0  0  3456 27743   0   0   0   0   0   0 131   77  30  0  1 99  0  0 0
    1  0  3498 27152   0   0   0   0   0   0 153 1088  35  1 10 87  2  0 11
    0  1  3499 26543   0   0   0   0   0   0 199 1530  38  1 19  0 80  0 59
    0  1  3499 25406   0   0   0   0   0   0 187 2472  38  2 26  0 72  0 53
    0  0  3456 24329   0   0   0   0   0   0 178 1301  37  2 12 20 66  0 42
    0  0  3456 24329   0   0   0   0   0   0 124   58  19  0  0 99  0  0 0
    0  0  3456 24329   0   0   0   0   0   0 123   58  23  0  0 99  0  0 0

    The disk xfer part provides the number of transfers per second to the specified physical volumes that occurred in the sample interval. One to four physical volume names can be specified. Transfer statistics are given for each specified drive in the order specified. This count represents requests to the physical device. It does not imply an amount of data that was read or written. Several logical requests can be combined into one physical request.

  • The in column of the vmstat output

    This column shows the number of hardware or device interrupts (per second) observed over the measurement interval. Examples of interrupts are disk request completions and the 10 millisecond clock interrupt. Since the latter occurs 100 times per second, the in field is always greater than 100. But the vmstat command also provides a more detailed output about the system interrupts.

  • The vmstat -i output
    The -i parameter displays the number of interrupts taken by each device since system startup. But, by adding the interval and, optionally, the count parameter, the statistic since startup is only displayed in the first stanza; every trailing stanza is a statistic about the scanned interval.
    # vmstat -i 1 2
    priority level    type   count module(handler)
        0       0   hardware     0 i_misc_pwr(a868c)
        0       1   hardware     0 i_scu(a8680)
        0       2   hardware     0 i_epow(954e0)
        0       2   hardware     0 /etc/drivers/ascsiddpin(189acd4)
        1       2   hardware   194 /etc/drivers/rsdd(1941354)
        3      10   hardware 10589024 /etc/drivers/mpsdd(1977a88)
        3      14   hardware 101947 /etc/drivers/ascsiddpin(189ab8c)
        5      62   hardware 61336129 clock(952c4)
       10      63   hardware 13769 i_softoff(9527c)
    priority level    type   count module(handler)
        0       0   hardware     0 i_misc_pwr(a868c)
        0       1   hardware     0 i_scu(a8680)
        0       2   hardware     0 i_epow(954e0)
        0       2   hardware     0 /etc/drivers/ascsiddpin(189acd4)
        1       2   hardware     0 /etc/drivers/rsdd(1941354)
        3      10   hardware    25 /etc/drivers/mpsdd(1977a88)
        3      14   hardware     0 /etc/drivers/ascsiddpin(189ab8c)
        5      62   hardware   105 clock(952c4)
       10      63   hardware     0 i_softoff(9527c)
    Note: The output will differ from system to system, depending on hardware and software configurations (for example, the clock interrupts may not be displayed in the vmstat -i output although they will be accounted for under the in column in the normal vmstat output). Check for high numbers in the count column and investigate why this module has to execute so many interrupts.