Siteminder Adminui JBOSS/Wildfly tuning parameters
search cancel

Siteminder Adminui JBOSS/Wildfly tuning parameters

book

Article ID: 271783

calendar_today

Updated On:

Products

SITEMINDER

Issue/Introduction

The below guide is a startup point to tune the Siteminder Adminui Jboss/Wildfly which will help cases with High CPU and out of memory issues 

Environment

12.8.x 

Resolution

Below are some starting guidelines to address Performance / CPU and memory issues with the Siteminder Adminui  running on JBoss or Wildfly (out of the box) 

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

Recommended JVM Settings

Set the JVM settings:

  • Windows

    1. Navigate to <JBOSS_HOME>\bin.

    2. Open standalone.conf.bat for editing.

    3. Set the JVM parameters in JAVA_OPTS with the following recommended values:

      • JVM Minimum Heap Size: 512 MB

      • JVM Maximum Heap Size: 4 GB

      • Generic JVM Arguments: -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+UseCompressedOops -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true

                 Example : set "JAVA_OPTS=-Xms512m -Xmx4096m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+UseCompressedOops -Djava.awt.headless=true -Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true"

  • Linux

    1. Navigate to <JBOSS_HOME>\bin.

    2. Open standalone.conf for editing.

    3. Set the JVM parameters in JAVA_OPTS with the following recommended values:

      • JVM Minimum Heap Size: 512 MB

      • JVM Maximum Heap Size: 4 GB

      • Generic JVM Arguments:   -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+UseCompressedOops -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true

                 Example: JAVA_OPTS="$JAVA_OPTS=-Xms512m -Xmx4096m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+UseCompressedOops -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Djava.security.egd=file:/dev/./urandom -Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true"

 

Open Files

On all JBoss or WildFly servers, set the Open Files (ulimit –n) to at least 50000 for the user that runs the JBoss or WildFly process.

 

Maximum User Processes

On all JBoss or WildFly servers, set the User Process (ulimit –u) to at least 131072 for the user that runs the JBoss or WildFly 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)

 

Increase Linux kernel Entropy

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

  1. Ensure that you have installed the rng-tool package on the Linux server:   yum –y install rng-tools
  2. Navigate to  -->  /etc/init.d
  3. Run   --> vi /etc/sysconfig/rngd
  4. Make the following changes:

           # Add extra options here

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

 

Test Entropy

Run the following command to test entropy:

            watch -n 1 cat /proc/sys/kernel/random/entropy_avail

If the return value is less than 1000, then consider adding an Entropy Pump to all servers.

 

Fine Tuning Garbage Collection

You can adapt and tune the garbage collection for your application performance needs by entering the following options with changed settings on the JVM command line:

-Xms8g -Xmx8g -XX:+UseG1GC -XX:ConcGCThreads=12 -XX:ParallelGCThreads=22 -XX:MaxGCPauseMillis=1000 -XX:InitiatingHeapOccupancyPercent=40 -XX:G1HeapWastePercent=2 -XX:G1ReservePercent=15 -XX:+UnlockExperimentalVMOptions -XX:G1OldCSetRegionThresholdPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=20 -XX:G1MaxNewSizePercent=25

  • -XX:ConcGCThreads=12

           Sets the number of parallel marking threads. Sets n to approximately 1/4 of the number of parallel garbage collection threads (ParallelGCThreads).

  • -XX:ParallelGCThreads=22

           Sets the value of the STW worker threads. Sets the value of n to the number of logical processors. The value of n is the same as the number of logical processors up to a value of 8.

  • -XX:MaxGCPauseMillis=1000

            Sets a target value for desired maximum pause time. The default value is 200 milliseconds. The specified value does not adapt to your heap size.

  • -XX:InitiatingHeapOccupancyPercent=40

            Sets the Java heap occupancy threshold that triggers a marking cycle. The default occupancy is 45 percent of the entire Java heap.

  • -XX:G1HeapWastePercent=2

           Sets the percentage of heap that you are willing to waste. The Java HotSpot VM does not initiate the mixed garbage collection cycle when the reclaimable percentage is less than the heap waste percentage. The default is 10 percent.

  • -XX:G1ReservePercent=15

           Sets the percentage of reserve memory to keep free so as to reduce the risk of to-space overflows. The default is 10 percent. When you increase or decrease the percentage, make sure to adjust the total Java heap by the same amount.

  • -XX:G1OldCSetRegionThresholdPercent=15

          Sets an upper limit on the number of old regions to be collected during a mixed garbage collection cycle. The default is 10 percent of the Java heap.

  • -XX:G1MixedGCLiveThresholdPercent=90

           Sets the occupancy threshold for an old region to be included in a mixed garbage collection cycle. The default occupancy is 65 percent.

  • -XX:G1NewSizePercent=2

           Sets the percentage of the heap to use as the minimum for the young generation size. The default value is 5 percent of your Java heap. This is an experimental flag.

  • -XX:G1MaxNewSizePercent=25

           Sets the percentage of the heap size to use as the maximum for young generation size. The default value is 60 percent of your Java heap. This is an experimental flag.