Browse Prior Art Database

Self-Optimizing Hierarchal Object Pooling Disclosure Number: IPCOM000020058D
Original Publication Date: 2003-Oct-22
Included in the Prior Art Database: 2003-Oct-22
Document File: 3 page(s) / 17K

Publishing Venue



In object oriented programming, object creation can be extremely poor performing. Guides to writing effective object oriented code often suggest pooling methods to increase java performance. However, in certain scenarios, object pooling can be a synchronization nightmare. The following design suggests a hierarchal object pooling method that provides for less synchronization and better performance.

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 53% of the total text.

Page 1 of 3

Self-Optimizing Hierarchal Object Pooling


Object creation and cleanup is overall of the most expensive operations in object oriented (OO) software development today. In order for applications to perform in these OO languages, it is vital for application developers to pool their objects. This is difficult for developers to maintain performance with pooling and is often ignored.

Current Pool Implementations

There are two main types of object pool implementations currently. First, commonly used is the synchronized global pool. This object pool is maintained within a process (and sometimes perhaps between processes) among multiple threads. In this implementation, the threads or processes will make synchronous calls to the object pool to request objects. Global synchronization can be extremely expensive and pooling with this synchronization can sometimes worsen the performance rather than increase the performance.

Additionally, another popular solution is the pool per thread. Since only one thread accesses this pool at a time, this pool does not need synchronization. However, based on what the thread is doing, resources can be under-utilized and applications may be wasting memory through these pools.

Hierarchal Object Pools

Object pools may be written such that each of these designs is optimized. Thread based pools may be backed by tiers of object pools in order to limit the access to one single global pool.

The tiered approach will increase performance by limiting the contention of access to any one tier. The only failure of this approach is that in the worst case scenarios, each thread is accessing the global pool often. These threads would have first had to first synchronously access the thread group tier, causing


Thread Unsynchronized Pool

Global Synchronized Pool

Thread Group Synchronized Pool

[This page contains 1 picture or other non-text object]

Page 2 of 3

more overall synchronization and worse performance.

Pool Tier Maximum simultaneous requests Number of pools

Thread (n threads) 1 n

Group (m groups) n/m m

Global n 1

Pool Size Disbursement and Rules

Pool settings will be distributed upon access of each subsequent tier. The maximum pool size of the Thread Tier will be obtained each time a thread pulls an object from the Group Tier. Similarly, the group tier may obtain its maximum s...