AIX environment variables

You can improve the performance of an AIX® system by setting the environment variables that control the AIX environment.

Set the following variables on an AIX system as per your requirement. Before you set the variables, see the AIX documentation to verify whether these settings are appropriate for your installation. For more information, see the IBM® AIX documentation.

AIXTHREAD_SCOPE
To set contention scope to system-wide, run the following command:
export AIXTHREAD_SCOPE=S
NODISCLAIM
To suppress the disclaim() system call when a free() call is made, set NODISCLAIM to true. Run the following command:
export NODISCLAIM=TRUE
SPINLOOPTIME
To specify the number of times that a process can spin on a busy lock before it blocks, run the following command for SMP systems:
export SPINLOOPTIME=650
MALLOCTYPE
To use the malloc subsystem, set the MALLOCTYPE environment variable.
Run the following command:
export MALLOCTYPE=buckets
To set MALLOCTYPE to buckets, you must use the maintenance level ML03 or later. If you set MALLOCTYPE to buckets, set ulimits for the directory server instance.
#ulimit -m unlimited
#ulimit -d unlimited
For SMP systems, run the following command to set the MALLOCMULTIHEAP variable:
export MALLOCMULTIHEAP=1
MALLOCOPTIONS
Use the MALLOCOPTIONS environment variable to tune memory allocation settings that is best suited for your applications on an AIX environment. You can set the following options by using the MALLOCOPTIONS environment variable:
multiheap
Configures the number of parallel heaps to be used by memory allocators. You can set the multiheap by exporting MALLOCOPTIONS=multiheap:n. The value n can vary from 1 through 32. The default value is 32, if n is not specified. This option is advisable for multithreaded applications, as it can significantly improve the performance.
pool
Maintains the bucket for each thread and provides a lock-free allocation and deallocation for blocks less than 513 bytes. This option improves the performance of multithreaded applications as it avoids the time that is spent on locking of memory size less than 513 bytes. The pool option makes small memory block allocations fast and efficient.
buckets
Controls the number of buckets, number of blocks per bucket, and size of each bucket. You can use the usage statistics of each bucket and refine the bucket settings.
Set the bucket option by exporting the MALLOCOPTIONS variable:
MALLOCOPTIONS=[buckets,[ number_of_buckets:n | bucket_sizing_factor:n | blocks_per_bucket:n |bucket_statistics:[stdout|stderr|pathname] | no_mallinfo],...].
When you set this option, it turns off the in-built bucket mechanism of the Watson™ allocator.
Note: When you run the ibmslpad process, the MALLOCOPTIONS environment variable is set internally to the following values:
MALLOCOPTIONS=multiheap,pool,buckets