1. Jstat-gcutil 14331 3s
3 seconds of monitoring memory recycling
S0 S1 E O P ygc ygct FGC F
0.00 9.04 26.16 61.43 99.52 833 6.973 14
0.00 9.04 26.16 61.43 99.52 833 6.973 14
0.00 9.04 26.16 61.43 99.52 833 6.973 14
0.00 9.04 26.16 61.43 99.52 833 6.973 14
0.00 9.04 26.16 61.43 99.52 833 6.973 14
S0 and S1 represent two survivor districts;
E represents the Eden area utilization rate;
O (old) represents the use rate of the older age;
P (Permanent) represents the use rate of permanent generation;
YGC (Young GC) represents minor GC number;
YGCT represents minor GC time-consuming;
FGC (full GC) represents the number of full GC;
FGCT (full GC) represents the full GC time-consuming;
GCT represents minor & full GC in total time-consuming.
Java Heap is divided into the new generation and the old age , the Cenozoic is generally divided into three blocks, Eden + from Survivor + to Survivor,eden and Survivor memory ratio is 8:1, each time only one Eden and one Survivor zone, and another Survivor is used for replication collection algorithms to reclaim memory.
Objects are generally allocated as far as possible to the Cenozoic, while for large objects (long strings and large arrays) are allocated directly in the old age, while the "age" objects are automatically promoted from the new generation to the old age.
The Java method area is called a permanent generation , and only the HotSpot virtual machine has a permanent generation.
An Minor GCoccurs automatically once the Eden region is not allocated.
When a Minor GC occurs, the virtual opportunity automatically detects (compares) the size of the object memory and the remaining memory size of the old age when the new generation is promoted to the old age, or a full GCif the promotion > remainder, if the promotion < remainder, to detect the memory guarantee of the old age Handlepromotionfailure whether the guarantee fails, if the guarantee fails, a full GC occurs once, and if the permit fails, a minor GC is performed.
2. jmap-dump:live,file=dumpfile14331
Jhat DumpFile
[Email protected] stock]# Jhat dumpfile
Reading from DumpFile ...
Dump file created Thu Mar 16:45:06 CST 2015
Snapshot Read, resolving ...
Resolving 264282 objects ...
Chasing references, expect, dots ..... ..... ..... ....... .........................
Eliminating duplicate references .... ..... ....... ..............................
Snapshot resolved.
Started HTTP server on port 7000
Server is ready.
Dump file created Thu Mar 16:45:06 CST 2015
Snapshot Read, resolving ...
Resolving 264282 objects ...
Chasing references, expect, dots ..... ..... ..... ....... .........................
Eliminating duplicate references .... ..... ....... ..............................
Snapshot resolved.
Started HTTP server on port 7000
Server is ready.
3. The address bar input ip:7000 directly to the bottom, from here to see the number of instances cited, where memory leaks
All classes including platform
Show all members of the Rootset
Show instance counts for all classes (including platform)
Show instance counts for all classes (excluding platform)
Show Heap Histogram
Show Finalizer Summary
Execute Object Query Language (OQL) query
Java Memory leak location jstat+jmap+jhat under Linux