Java Application Performance Analysis sharing

Source: Internet
Author: User

The main way of performance analysis
    • Monitoring: Monitoring is a general way to view the runtime behavior of an application. There are often multiple views (view) that show CPU usage, memory usage, thread status, and other useful information in real time, respectively, so that users can quickly discover the key to the problem.
    • Dump: The profiling tool obtains current state data from memory and stores it in a file for static performance analysis. A Java program triggers a dump operation by adding the appropriate condition parameters when the Java program is started. It consists of the following three types:
      • System dump: The dump of the local system generated by the JVM, also known as the core dump. In general, the amount of system dump data is large and requires platform-related tools to analyze, such as WinDbg on Windows and gdb on Linux.
      • Java dump: Formatted data generated internally by the JVM, including thread information, class loading information, and heap statistics. It is also often used to detect deadlocks.
      • Heap Dump: The JVM stores the heap contents of all objects to a file.
    • Snapshot: After the application starts, the profiling Tools begin to collect various runtime data, some of which are displayed directly in the monitoring view, while most of the data is stored internally until the user asks for a snapshot, and statistics based on the saved data are displayed. A snapshot contains information about the execution of an application over a period of time, typically with both CPU and memory snapshots.
      • CPU snapshots: Mainly includes the call relationships and run times of functions in the application, which can often be viewed in the CPU snapshot view.
      • Memory Snapshot: Mainly includes the allocation and use of memory, all loaded classes, the existence of object information and the reference relationship between objects and so on. This information can often be viewed in a memory snapshot view.
    • Performance Analysis: Performance analysis is to help developers locate programs that need to be optimized by collecting execution data from the program runtime to improve the speed of the program or the efficiency of memory usage, mainly in the following three areas:
      • CPU Performance Analysis: The main purpose of CPU performance analysis is to count the function's invocation and execution time, or, more simply, to count the application's CPU usage. There are usually two ways of CPU monitoring and CPU snapshots to display CPU performance analysis results.
      • Memory Performance Analysis: The primary purpose of memory performance analysis is to detect possible memory leaks through statistical memory usage and to determine the direction to optimize memory usage. There are usually two ways to display memory profiling results, memory monitoring and memory snapshots.
      • Threading Profiling: Threading profiling is primarily used to identify memory problems in multithreaded applications. This generally includes the state change of the thread, the deadlock condition, and the distribution of the state during the lifetime of a thread.

Tools: Java Visual VMS

Jprofiler

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.