DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Tuning I/O resources

Tuning the number of multiphysical buffers

There is a possible performance impact from having too little memory available for multiphysical buffers. When the system requires a scatter-gather, transfer, or copy buffer when none is available, it will put the process requiring the resource to sleep until one is available. The number of 4KB pages of memory available for these buffers is determined by the value of the kernel parameter NMPBUF.

``Configuring kernel parameters'' tells you how you can use the configure(ADM) utility to change the value of NMPBUF.

Use sar -B and sar -h (or their mpsar equivalents for SMP) to see if enough multiphysical buffers are configured. The output from sar -B reports on the system's use of copy buffers:

   23:59:44  cpybufs/s slpcpybufs/s
   23:59:49       0.00         0.00
   23:59:54       0.00         0.00
   23:59:59       0.00         0.00
   

Average 0.00 0.00

The slpcpybufs/s column shows how many times per second a process has to sleep waiting for a copy buffer.

sar -h reports on the usage of the other multiphysical buffers:

   23:59:44 mpbuf/s  ompb/s mphbuf/s omphbuf/s  pbuf/s spbuf/s dmabuf/s sdmabuf/s
   23:59:49    0.10    0.00     0.21      0.00    0.06    0.00     0.04      0.00
   23:59:54    0.09    0.00     6.22      0.00    0.18    0.00     0.07      0.00
   23:59:59    0.20    0.00     0.54      0.00    0.05    0.00     0.03      0.00
   

Average 0.13 0.00 2.32 0.00 0.10 0.00 0.05 0.00

The columns ompb/s and sdmabuf/s show how many times the system ran short of scatter-gather and DMA transfer buffers per second.

If sar -B and sar -h report non-zero values for slpcpybufs/s, sdmabuf/s, or ompb/s, increase the value of the kernel parameter NMPBUF by at least the maximum value reported for the sum of the following quantities:

NMPBUF * ( slpcpybufs/s / ( 4 * cpybufs/s ))

NMPBUF * ( 4 * ompb/s / mpbuf/s )

NMPBUF * ( sdmabuf/s / dmabuf/s )

For example, suppose sar -B and sar -h reported the following shortfall in the availability of multiphysical buffers at a particular point in time:

   12:00:00  cpybufs/s slpcpybufs/s
   12:05:00       4.01         1.17
   

12:00:00 mpbuf/s ompb/s mphbuf/s omphbuf/s pbuf/s spbuf/s dmabuf/s sdmabuf/s 12:05:00 3.05 0.30 5.11 1.21 2.89 0.54 7.62 1.54

In this case, if the current value of NMPBUF is 40, you should increase it by:
   40*((1.17/(4*4.01))+(4*0.30/3.05)+(1.54/7.62))
This evaluates to 27 when rounded up to the nearest whole number. If you wish to err on the safe side, double the value of NMPBUF to 80. This will require an extra 160KB of memory (40 4KB pages).

The following table summarizes the commands that you can use to view multiphysical buffer activity:

Viewing multiphysical buffer activity

Command Field Description
[mp]sar -B cpybufs/s copy buffer usage per second
  slpcpybufs/s sleeps waiting for copy buffer per second
[mp]sar -h %mpbuf/s scatter-gather buffer usage per second
  ompb/s number of times scatter-gather buffers were not available per second
  dmabuf/s DMA transfer buffers usage per second
  sdmabuf/s sleeps waiting for DMA transfer buffers per second


Next topic: The mechanics of a disk transfer
Previous topic: How the system uses multiphysical buffers to overcome 24-bit addressing limitations

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003