Friday, February 28

High CPU Utilization issue

 We can follow below steps as assuming one of the wls managed server/jvm causing high cpu or slow performance on linux,

1. Find out which JVM is using more cpu or slow performance jvm by using top command

2. Run the below command to see which threads in the JVM's are using high cpu/slow performance,

top -Hp

Note the thread id's which are causing more cpu usage or slow performance

3. Take a multiple threads dumps with 5 to 10 seconds interval using kill -3

so we can see whether the same threads are using more cpu/slow performance at all the time,because some of threads takes more cpu for few seconds only,so taking multiple threads dumps will help us to get the threads which are using the cpu constantly.

4. In the threads dumps, you can search for the thread id's (if you are using the sun jdk then thread id is on hexa and that needs to be converted to decimal and look for the decimal on the thread dump but if u are using jrockit then u can directly search for the thread id in the dump

5. Once you have stack strace of the threads which are causing the high cpu/slow performance , u can see who is causing the issue ,may be a bad app code, third party library, or may be an slow network,or slow data base respone or Garbage collector thread. etc.. based on the issue we need to work on it to get it fixed.



How to solve the High CPU Utilization issue?
  • Rajasekhar Reddy Naredla before restarting the server we need verify the below tings. 1. top command –> to know the high CPU consuming process.
    2. ps -ef|grep –> to know details of the process consuming high CPU.
    3. ls -lrt /proc//fd

    or ls -lrt /proc//fd |grep log —-> to know the files accessed by the process. To know the log files and other related files.
  • Maheshkumar Subbaiyan We can follow below steps as assuming one of the wls managed server/jvm causing high cpu or slow performance on linux,

    1. Find out which JVM is using more cpu or slow performance jvm by using top command


    2. Run the below command to see which threads in the JVM's are using high cpu/slow performance,

    top -Hp

    Note the thread id's which are causing more cpu usage or slow performance

    3. Take a multiple threads dumps with 5 to 10 seconds interval using kill -3

    so we can see whether the same threads are using more cpu/slow performance at all the time,because some of threads takes more cpu for few seconds only,so taking multiple threads dumps will help us to get the threads which are using the cpu constantly.

    4. In the threads dumps, you can search for the thread id's (if you are using the sun jdk then thread id is on hexa and that needs to be converted to decimal and look for the decimal on the thread dump but if u are using jrockit then u can directly search for the thread id in the dump

    5. Once you have stack strace of the threads which are causing the high cpu/slow performance , u can see who is causing the issue ,may be a bad app code, third party library, or may be an slow network,or slow data base respone or Garbage collector thread. etc.. based on the issue we need to work on it to get it fixed.

2 comments:

  1. Bluehost is definitely one of the best website hosting provider for any hosting services you require.

    ReplyDelete
  2. Are you looking for free Instagram Likes?
    Did you know that you can get these AUTOMATICALLY & ABSOLUTELY FREE by registering on Like 4 Like?

    ReplyDelete