IBM Power7 Optimization And Tuning Manual page 86

Table of Contents

Advertisement

malloc disclaim
By enabling this option, free() automatically disclaims memory. This suboption is useful
for reducing the paging space requirement. This option can be set by exporting
MALLOCOPTIONS=disclaim.
Use cases
Here are some uses cases that you can use to set up your environment:
1. For a 32-bit single-threaded application, use the default allocator.
2. For a 64-bit application, use the Watson allocator.
3. Multi-threaded applications use the multiheap option. Set the number of heaps
proportional to the number of threads in the application.
4. For single-threaded or multi-threaded applications that make frequent allocation and
deallocation of memory blocks smaller than 513, use the malloc pool option.
5. For a memory usage pattern of the application that shows high usage of memory blocks of
the same size (or sizes that can fall to common block size in bucket option) and sizes
greater than 512 bytes, use the configure malloc bucket option.
6. For older applications that require high performance and do not have memory
fragmentation issues, use malloc 3.1.
7. Ideally, the Watson allocator, along with the multiheap and malloc pool options, is good
for most multi-threaded applications; the pool front end is fast and is scalable for small
allocations, while multiheap ensures scalability for larger and less frequent allocations.
8. If you notice high memory usage in the application process even after you run free(), the
disclaim option can help.
For more information about this topic, see 4.4, "Related publications" on page 94.
Pthread tunables
The AIX pthread library can be customized with a set of environment variables. Specific
variables that improve scaling and CPU usage are listed here. A full description is provided in
the following documentation settings:
AIXTHREAD_SCOPE={P|S}
The P option signifies a process-wide contention scope (M:N) while the S option signifies a
system-wide contention scope (1:1). Use system scope (1:1) for AIX. Although process
scope (M:N) continues to be supported, it is no longer being enhanced in AIX.
SPINLOOPTIME=n
The SPINLOOPTIME variable controls the number of times the system tries to get a busy
mutex or spin lock without taking a secondary action, such as calling the kernel to yield the
process. This control is intended for MP systems, where it is hoped that the lock that is
held by another actively running pthread is released. The parameter works only within
libpthreads (user threads). If locks are usually available within a short period, you might
want to increase the spin time by setting this environment variable. The number of times to
try a busy lock before yielding to another pthread is n. The default is 40 and n must be a
positive value.
70
POWER7 and POWER7+ Optimization and Tuning Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Power7+

Table of Contents