Performance - STREAMS Enhancements


The STREAMS subsystem is responsible for, among other things, system networking capabilities. The A+Edition for Solaris includes a number of enhancements to the STREAMS subsystem to improve the performance of the system on a network.

One of these improvements is an extension to the buffer management policies that are part of the STREAMS subsystem. Communications between the different modules on a stream is done through messages. The producer of a message must acquire a buffer to hold the message. This buffer is then passed to the next module on the steam. The consumer of the message will free the buffer after it has acted upon the message. There is some amount of overhead associated with the acquisition and freeing of the buffer.

In the A+Edition, this facility has been extended, allowing certain subsystems which are heavy users of fixed sized buffers to manage private buffer pools.These private buffers are initially allocated from the buffer pool by the owning subsystem. When they are allocated a reuse flag is placed within the free_rtn structure to indicate that the message headers and data buffer should not be released by freeb(). Rather, the buffer is marked as available for reuse, thus enabling the managing subsystem to immediately reuse this buffer. By continuing to reuse the same message, the overhead required to acquire the data buffer and message header is eliminated as is the overhead that is required for the release of these resources.