Java cup occupies high analysis scripts and javacup occupies scripts

Source: Internet
Author: User

Java cup occupies high analysis scripts and javacup occupies scripts
[Was @ dmgr ita-scripts] $ vi java_analys.sh
PID = $1; ps-mp $ PID-o THREAD, tid, time | awk-F "" '{print $2 "" $8}' | grep-v CPU | grep-v "-" | sort-nr | head-1 | awk -F "" '{print $2}' | xargs pri
Ntf "% x \ n" | while read line; do TID = $ line; echo $ TID; jstack $ PID | grep $ TID-A 30; done
The CPU usage of java programs is extremely high. Why?

Since you said you had no problem before .. Now we have another problem. If the program is not modified. So you can't see the optimization of the Java Virtual Machine. If you have modified .. Then you can see that your resources are not released. Or, the read from your multi-threaded resources causes a deadlock ..

CPU usage of java programs is too high

There are too many times to connect to the database. The occupied connection is not closed and the connection is not released.

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.