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.
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?
No comments:
Post a Comment