Debugging High CPU Utilization Issues

The CPU utilization of container application for a particular service depends on the complexity of service implementation, payload, workload, number of services deployed on the container application, and the CPU or Memory resources made available in the container.

Prerequisites

Assuming all the components of the engine are tuned for debugging high CPU utilization issues on container, collect the following data that helps in further debugging and understanding the issues.

Procedure

  1. Capture thread dumps for analyzing the thread state and calls. Capture 5 thread dumps at an interval of 5 seconds each. Redirect all the collected threads dumps to separate files.
    • The thread dumps can be captured using jstack utility shipped with JDK.
      ./jstack <PID of container application> > ThreadDump_n.txt
    • The thread dumps can be captured through JConsole or JVisualVM utilities.
  2. Capture top CPU consuming threads data for 5 minutes run by using a jvmtop utility.
    For more information about jvmtop utility, see support article KB000034702.
    ./jvmtop <PID of container application> > JVM_topthreads.txt
    
  3. Capture method level CPU profiling data for 5 minutes run by using a jvmtop utility.
    ./jvmtop --profile <PID of container application> > JVM_CPUProfile.txt
  4. Capture container logs for the test run duration.
  5. Capture the CPU and memory utilization of the container application for 5 minutes run.
    • The data can be captured through a top utility on Unix.
      top -p <PID of container application> > top_container.txt
      
    • The data can also be captured through JConsol or JVisualVM utilities.
  6. Check the BW_JAVA_OPTS and other runtime parameters with which the container is running. This helps analyze the JVM parameters and other engine tuning parameters.
  7. Capture system configurations of container such as CPU details, RAM, and number of cores where TIBCO BusinessWorks™ Container Edition applications, external services and load generator are running. Capture details of /proc/meminfo and /proc/cpuinfo files.
    cat /proc/meminfo and cat /proc/cpuinfo