4.5 AIX-specific Java environment settings
The following tables list the set of recommended settings for the AIX Java environment.1
Environment variable1 Recommended value AIXTHREAD_SCOPE2 S AIXTHREAD_MUTEX_DEBUG OFF AIXTHERAD_COND_DEBUG OFF AIXTHREAD_RWLOCK_DEBUG OFF SPINLOOPTIME3 500
1For Java 5, the java command automatically sets these settings (except SPINLOOPTIME). These settings are only necessary when using JNI to invoke Java (meaning when a non-Java application executes Java code or a Java program.
2In AIX 5.2, Java runs with system-wide contention scope threads.
2Each Java thread is mapped one-to-one to an AIX kernel thread
2Calls to java.lang.Thread.setPriority() have no effect.
2In AIX 5.3 and later, programs can set the priority of system contention scope threads Java 5.0 exploits this feature, but Java1.4.2 does not.
2Calls to java.lang.Thread.setPriority() will change the priority.
3SPINLOOPTIME controls the number of times the system will retry a busy lock before yielding to another process. The default value is 40. This should be increased to 500 or higher because a busy lock retry is inexpensive compared to the alternative. Use the tprof command to determine if the check_lock routine has high CPU usage. If it does, you can increase the value even more.
3Table 4-2 lists the process settings.
Process limits Setting data area, KB ulimit -d unlimited stack size, KB ulimit -s unlimited physical memory, KB ulimit -m unlimited file descriptors a process may have ulimit -n unlimited
Example 4-10 shows the contents of a startup file (rc.was) we used to set parameters.
#Check and set the required WebSphere process environment within file rc.was # for LIMITV in d \ s \ m \ n do LIMIT=`ulimit -${LIMITV} ` if [ "${LIMIT}" != "unlimited" ] then ulimit "-${LIMITV}" unlimited fi done # export AIXTHREAD_SCOPE=S export AIXTHREAD_MUTEX_DEBUG=OFF export AIXTHERAD_COND_DEBUG=OFF export AIXTHREAD_RWLOCK_DEBUG=OFF export SPINLOOPTIME=5001Taken from: Java tuning on AIX