Troubleshooting of high CPU load

Source: Internet
Author: User

Troubleshooting of high CPU load

Today, a tomcat process has a cpu load of 100%. Follow these steps to identify the cause.

1. Run the top-c command to find the id of the process with the highest cpu

2. Run the top-H-p pid command to display the resource consumption of all threads of the process you just found. Find the thread tid 8627 with high CPU load, and convert the number to hexadecimal, 21B3.

3. Execute jstack-l pid to get the thread dump file of the process. This command will output the running stack of all threads of the process.

4. open the file in notepad and search for "21B3", which is the thread id displayed in hexadecimal notation. After searching, the following stack is produced by this thread. Troubleshoot the problem from here.

The final troubleshooting result today is that "vm thread" consumes the resources of the process. The jvm consumes cpu only. It is easy to think of crazy GC. Search the system log by the keyword "overhead" and find the "GC Overhead" log. The problem is clear. Jvm is in the crazy Full GC, and a large object is always reachable from the Root Node path and cannot be released.

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.