Jmap, Jhat analysis heap memory overflow

Source: Internet
Author: User
Tags garbage collection

To view the usage of heap memory under this process
Jmap-heap 1963 (Process number)

Quick way to locate memory leaks:
Jmap-histo:live 1963

Jmap-histo:live 1963 >1.txt Output information to a specified file

You can find the specific method that caused the memory overflow.

3. You can also use Jhat to analyze the cause of memory overflow
Use dump memory information to Heap.bin file
Jmap-dump:live,format=b,file=heap.bin 1963 (Process number)

Using Jhat to analyze Heap.bin files
jhat-j-mx512m Heap.bin If there is not enough memory in the parsing process, you need to increase the memory such as: jhat-j-mx800m Heap.bin

You can see the results of the analysis by accessing Http://192.168.5.105:7000/through the browser

4.jstat Monitoring garbage collection (GC) time, number of times

S0: Survival Zone 0
S1: Survival Zone 1
E: Young Generation
O: Old generation
M: Lasting Generations
(The above is the percentage of used)

YGC: The number of young generations of YGC
YGCT: Time spent by young generation YGC
FGC: Number of old generation full GC
FGCT: Time spent on old generation full GC
GCT: Total time spent in GC

Jstat Dynamic view of garbage collection:

Collect data once every 3s clock, collect 10 times.

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.