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:
- NODISCLAIM
- To suppress the disclaim() system call when a free() call is made, set NODISCLAIM to true. Run the following command:
- 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:
- MALLOCTYPE
- To use the malloc subsystem, set the MALLOCTYPE environment variable.
- 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.