Troubleshooting high CPU Usage for Java processes

Source: Internet
Author: User
Tags cpu usage high cpu usage

Recent Java applications, CPU usage has been very high, often up to 100%, through the following steps to solve the perfect, share.

1.jps gets the PID of the Java process.

2.jstack PID >> Java.txt Exports the thread stacks that the CPU consumes high processes.

3.top-h-P PID to see which thread of the corresponding process is consuming high CPU.

4.echo "OBASE=16; PID "| BC converts the PID of a thread to 16 binary.

5. In the second step of the exported Java.txt, look for the thread PID converted into 16 binary. Find the corresponding line stacks.

6. Analyze what is the business operation of high-load line stacks. Optimize the program and handle the problem.

This article is from the "Learning Journey" blog, so be sure to keep this source http://blogtank.blog.51cto.com/10511324/1962590

Troubleshooting high CPU Usage for Java processes

Related Article

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.