Java tuning for AIX
AIX® has a set of recommended parameters for your Java™ environment.
- AIXTHREAD_SCOPE=S
- The default value for this variable is P, which signifies process-wide contention scope (M:N). The value of S signifies system-wide contention scope (1:1). For Java applications, the default value of this variable is S.
- AIXTHREAD_MUTEX_DEBUG=OFF
- Maintains a list of active mutexes for use by the debugger.
- AIXTHREAD_COND_DEBUG=OFF
- Maintains a list of condition variables for use by the debugger.
- AIXTHREAD_RWLOCK_DEBUG=OFF
- Maintains a list of active mutual exclusion locks, condition variables,
and read-write locks for use by the debugger. When a lock is initialized,
it is added to the list if it is not there already. This list is
implemented as a linked list, so searching it to determine if a lock
is present or not has a performance implication when the list gets
large. The problem is compounded by the fact that the list is protected
by a lock, which is held for the duration of the search operation.
Other calls to the pthread_mutex_init() subroutine must wait
while the search is completed. For optimal performance, you should
set the value of this thread-debug option to
OFF
. Their default isON
. - SPINLOOPTIME=500
- Number of times that a process can spin on a busy lock before
blocking. This value is set to 40 by default. If the tprof command
output indicates high CPU usage for the check_lock routine,
and if locks are usually available within a short amount of time,
you should increase the spin time by setting the value to 500 or higher.
Also, the following settings are recommended for your Java environment:
ulimit -d unlimited
ulimit -m unlimited
ulimit -n unlimited
ulimit -s unlimited
Certain environment parameters and settings can be used to tune Java performance within the operating system. In addition, many of the techniques for tuning system components, such as CPU, memory, network, I/O, and so on, can increase Java performance. To determine which environment parameters may be beneficial to your situation, refer to the specific topics for more information.
To obtain the best possible Java performance and scalability, use the latest available versions of the operating system and Java, as well as for your Just-In-Time (JIT) compiler.