Browse Prior Art Database

Autonomic Scaling of Free-Buffer Pool Sizes to Maximize Performance and Minimize Memory Consumption Disclosure Number: IPCOM000031273D
Original Publication Date: 2004-Sep-20
Included in the Prior Art Database: 2004-Sep-20
Document File: 4 page(s) / 92K

Publishing Venue



This article describes a technique for autonomic scaling of application free-buffer pool sizes to maximize performance and minimize memory consumption by implementing buffer pools that autonomically scale the number of buffers in each pool during program execution (on-the-fly). The scaling is based upon the pattern of buffer usage as buffers are taken from the pools to be used by an application and then released back to the pools to later be used by another application. The autonomic re-sizing of the buffer pools is also implemented so as not to negatively impact the performance of the system while adjusting the pool sizes.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 37% of the total text.

Page 1 of 4

Autonomic Scaling of Free-Buffer Pool Sizes to Maximize Performance and Minimize Memory Consumption


In computer systems, data that needs to be transferred between programs and systems is commonly placed in buffers. Applications needing buffers typically request them from the operating system, and release them when they are done. For performance reasons these buffers may be obtained from a pool of preallocated buffers. And in even more complex systems, there may be multiple buffer pools of varying sized buffers from which an application can obtain and release a buffer.

The problems this creates is that preallocating too many buffers can waste memory, while preallocating too few can cause less that optimal performance because new buffers will have to be allocated at runtime. Determining the right mix is difficult at best, and is subject to change over time due to changes in the needs of the using applications, the frequency of use, etc..

In order to solve this, a buffer pool manager us used, which initially allocates a set of buffer pools to contain the free/available buffers, where each buffer pool services buffers of a specific size. For example, one could have a buffer pool for 1K buffers, a pool for 2K buffers, a pool for 4K buffers, and a pool for 8K buffers.

When an application needs a buffer of a particular size, it will request it from the buffer pool manager. The buffer pool manager will fulfill the request by returning a buffer obtained/removed from the appropriate buffer pool if a buffer exist in the pool. If a buffer of the requested size does not exist, then a new one will be allocated and returned. Buffers are only returned/added to the buffer pools when they are released by the application that was using them.

When a buffer is released by the using application and is ready to be returned to a buffer pool, the pool manager will decide autonomically based on various factors whether or not to add the buffer to the free pool, or to release it to the system and have it's memory reclaimed. The buffer will be returned immediately to the appropriate free pool if both of the following two conditions are met:

1. The total memory consumed by all of the buffers in the free pools is not greater than the maximum amount of memory, 'TotalMax', that can be reserved for this purpose (this could be a configurable parameter, could be based on amount of memory available on the system, etc.)

2. The total memory consumed by all of the buffers in the specific buffer pool that the buffer will be returned to is not greater than 'PoolMax' percent of the maximum allowed for all the pools (where 'PoolMax' could be a configurable parameter, or a hard-coded value such as 50%, etc.)

The 1st condition above will ensure that the total amount of memory used for pooling buffers not currently in use does not get out of hand and cause memory/performance problems because too much memory is in the pools. The 2nd condition above will ensure that n...