HP-UX 11i Release Notes (December 2000)

Programming
Libraries
Chapter 13262
are freed back to their arena. The allowable values of
<retirement_age>
range from 0 to 1440 minutes (=24*60, i.e. one day). If
<retirment_age>
is 0, retirement is disabled and unused caches will be kept indefinitely. It
is recommended that
<retirement_age>
be configured to 0 unless space
efficiency is important and it is known that an application will stabilize
to a smaller number of threads than its initial number.
In general, kernel threaded applications that benefit in performance
from activating the small block allocator may also benefit further by
activating a modest-sized ordinary cache, which also activates caching
small blocks (from which most of the benefit is derived). For example, a
setting that might be tried to begin with would be:
_M_SBA_OPTS=256:100:8
_M_CACHE_OPTS=100:20:0
The smallest ordinary cache that is legal and will activate small block
caching (if the SBA is also configured) is
_M_CACHE_OPTS=1:8:0
It can happen that activating small block caching with this minimum
level of ordinary cache gives all the performance benefit that can be
gained from malloc cache, and increasing the ordinary block cache size
further does not improve matters. Or, increasing cache size further may
give some further improvement for a particular application.
The malloc() per-thread cache is a heuristic which may or may not
benefit a given kernel-threaded application that makes intensive use of
malloc. Only by trying different configurations can you determine
whether any speed improvement can be obtained from per-thread cache
for a given application, and what the optimal tuning is for that
application.
Impact No impact on performance if cache is not configured or if
application is not kernel-threaded. There are possible significant speed
performance improvements for some kernel applications if cache is
configured.
There is a small additional space cost (in process heap size) associated
with the cache machinery. There is no per-block space cost for caching
small blocks. However, there is a small space cost per ordinary block
cached. ISVs whose applications are very memory intensive may want to
configure only a minimum-sized or very small ordinary cache when
experimenting with this feature.