Performance Tuning for WebLogic

The fine-tuned configurations that we recommend for optimizing the performance of the WebLogic application server are:

Open Files

On all WebLogic servers, set the open files (ulimit –n) to at least 50000 for the user that runs the WebLogic process.

Maximum User Processes

On all WebLogic servers, set the User Process (ulimit –u) to at least 131072 for the user that runs the WebLogic process.

Connection Backlog

Change the value of the echo parameter to 3000 when a high rate of incoming connection requests result in connection failures:

echo 3000 > /proc/sys/net/core/netdev_max_backlog

echo 3000 > /proc/sys/net/core/somaxconn


Set TCP_KEEPALIVE_INTERVAL

The TCP_KEEPALIVE_INTERVAL parameter determines the wait time between isAlive interval probes.

Set the value of the TCP_KEEPALIVE_INTERVAL parameter to 15 seconds, which is the recommended value. The default value is 75 seconds.

echo 15 > /proc/sys/net/ipv4/tcp_keepalive_intvl


Set TCP_KEEPALIVE_PROBES

The TCP_KEEPALIVE_PROBES parameter determines the number of probes before timing out. 

Set the value of the TCP_KEEPALIVE_PROBES parameter to 5 seconds, which is the recommended value. The default value is 9 seconds 

echo 5  > /proc/sys/net/ipv4/tcp_keepalive_probes


Allocate Huge Pages for Java Virtual Machine (JVM) Heap

Set the following three settings in /etc/sysctl.conf file.

vm.nr_hugepages = 2048

vm.nr_hugepages_mempolicy = 2048

Calculation: 2048 = 8192 (Max Heap Size) /4 (Page Size)

Ensure that the following parameter is at least set to the following value (if already set to higher number, even better):

kernel.shmmax = 8689934592

Calculation: 8689934592 = 8192 * 1048576 bytes/MB + 100000000 bytes

kernel.shmall = 2172483648

Calculation: 2172483648 = 8689934592 (shmmax) ) / 4 (Page Size)

For more information, refer to http://www.oracle.com/technetwork/java/javase/tech/largememory-jsp-137182.html.


Increase Linux kernel Entropy

On all CA Single Sign-On servers, increase the kernel entropy by adding the following rngd daemon:

Ensure that you have installed the rng-tool package on the Linux server:

yum –y install rng-tools

Navigate to /etc/init.d.

Run vi /etc/sysconfig/rngd.

Make the following changes:

# Add extra options here

EXTRAOPTIONS="-r /dev/urandom -o /dev/random -t 1 -W 4096"



Java Configuration

Set the JVM Settings:

 Windows

Navigate to <WebLogic_DIR>/bin.

Open setDomainEnv.cmd for editing.

Set MEM_ARGS with the following recommended values:

set MEM_ARGS=-Xms8192m -Xmx8192m

 Note: The value is determined by the amount of memory available on the server. As a thumb rule, the minimum value and maximum value must be set to 8192.

Set JAVA_OPTIONS with the following recommended values:

set JAVA_OPTIONS=%JAVA_OPTIONS% -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+UseCompressedOops -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -XX:ReservedCodeCacheSize=50m -Djavax.xml.stream.XMLInputFactory=weblogic.xml.stax.XMLStreamInputFactory

Restart the WebLogic application server.

 

 Linux 

Navigate to <WEBLOGIC_DOMAIN_DIR>/ bin.

Open setDomainEnv.sh for editing.

Set MEM_ARGS with the following recommended values: 

MEM_ARGS="-Xms8192m -Xmx8192m"

Set JAVA_OPTIONS with the following recommended values:

JAVA_OPTIONS="${JAVA_OPTIONS} -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+UseCompressedOops -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Djava.security.egd=file:/dev/./urandom -XX:ReservedCodeCacheSize=50m -Djavax.xml.stream.XMLInputFactory=weblogic.xml.stax.XMLStreamInputFactory

Restart the WebLogic application server.

 Note: Repeat the steps for any other JVM that is a member of the cluster.