Setting limits for the sampling facility buffer

Red Hat Enterprise Linux 9.2 LPAR mode

Use the chcpumf command to set the minimum and maximum buffer size for the CPU-measurement sampling facility.

Before you begin

For each CPU, the CPU-measurement sampling facility has a buffer for writing sample data. The required buffer size depends on the sampling function and the sampling interval that is used by the perf tool. The sampling facility starts with an initial buffer size that depends on the expected requirements, your IBM Z® hardware, and the available hardware resources. During the sampling process, the sampling facility increases the buffer size if required.

The sampling facility is designed for autonomous buffer management, and you do not usually need to intervene. You might want to change the minimum or maximum buffer size, for example, for one of the following reasons:
  • There are considerable resource constraints on your system that cause perf sampling to malfunction and sample data to be lost.
  • As an expert user of perf and the sampling facility, you want to explore results with particular buffer settings.

Procedure

Use the chcpumf command to set the minimum and maximum buffer sizes.

  1. Optional: Specify the lscpumf command with the -i parameter to display the current limits for the buffer size .
  2. Optional: Specify the chcpumf command with the -m parameter to set the minimum buffer size.
    Example:
    # chcpumf -m 500
    The value that you specify with -m is the minimum buffer size in multiples of sample-data-blocks. A sample-data-block occupies approximately 4 KB. The specified minimum value is compared with the initial buffer size that is calculated by the sampling facility. The greater value is then used as the initial size when the sampling facility is started.
  3. Optional: Specify the chcpumf command with the -x parameter to set the maximum buffer size.
    Example:
    # chcpumf -x 1000
    The value that you specify with -x is the maximum buffer size in multiples of sample-data-blocks. A sample-data-block occupies approximately 4 KB. The specified maximum is the upper limit to which the sampling facility can adjust the buffer.
    Tips:
    • You can specify both, the minimum and the maximum buffer size with a single command.
    • Use the -V parameter to to display the minimum and maximum buffer settings that apply as a result of the command.

Example

To change the minimum buffer size to 500 times the size of a sample-data-block and the maximum buffer size to 1000 times the size of a sample-data-block, issue:
# chcpumf -V -m 500 -x 1000
Sampling buffer sizes:
    Minimum:    500 sample-data-blocks
    Maximum:   1000 sample-data-blocks