This is a creation in
Article, where the information may have evolved or changed.
How to turn on print GC information
Just add the environment variables before the program executes GODEBUG gctrace =1 , such as:GODEBUG gctrace =1
This is a creation in
Article, where the information may have evolved or changed.
Reprinted from: http://blog.csdn.net/erlib/article/details/51850912
English original link:
Original link: http://www.cubrid.org/blog/dev-platform/how-to-monitor-java-garbage-collection/
This is the second article in the article "becoming a GC expert series." In the first understanding of Java garbage Collection, we learned several
Chapter 6 JVM garbage collector (2) jvm garbage collection
The previous chapter records several common garbage collectors. For details, see chapter 5 JVM garbage collector (1).
1. G1
Note:
From the Perspective, compared with CMS, G1 is
Chapter 5 JVM garbage collector (1): jvm garbage collection
(The garbage collection algorithm is a theory, and the garbage collector is a collection algorithm. For details about the collection algorithm, see Chapter 4 JVM garbage collection
This is a creation in
Article, where the information may have evolved or changed.
I. Information collection of GC information
Set the environment variable godebug=gctrace=1.
Use the method if the program is myserver. The normal startup method
This is a creation in
Article, where the information may have evolved or changed.
original articles, reproduced please specify the Source: Server non-amateur research http://blog.csdn.net/erlib author Sunface
This article will continue to
This is a creation in
Article, where the information may have evolved or changed.
This article transferred from: http://studygolang.com/articles/2701
I. Information collection of GC information
Set the environment variable godebug=gctrace=1.
Use
recently read the Zhou Zhiming version of the "Deep understanding Java Virtual Machine" first and second edition, write very good, a lot of harvest, summarized here. memory Partitioning in the JVM:For example, it is divided into five pieces, of
0. The new generation of tuning lawsIncrease the Cenozoic space, Minor GC frequency, Minor GC time rise. Reduced Cenozoic space, Minor GC frequency rise, Minor GC time dropI. Typical problems of the CenozoicTake a look at a GC log: New generation
In addition to the integrated VISUALVM and Jconsole, the JVM also has small tools such as JPS, Jstack, Jmap, Jhat, Jstat, etc.Problems that may be encountered in development
OutOfMemoryError, Low memory
Memory leaks
Thread deadlock
JDK itself comes with a lot of practical tools. The following are commonly used:1. JPs: displays all Virtual Machine Processes-Q: only ID numbers are listed.-M: ID, primary class, and parameters passed to the primary class-L: ID and full name of the
The MapReduce counter provides us with a window to observe the various details of the MapReduce job run time. I focused on mapreduce performance tuning this March, and most of the optimizations are based on the numerical performance of these counter.
[Size = large] cause: When datacenter is started on the RedHat test server, the shell may occur in a probabilistic manner. This problem was not encountered during daily update of the test environment in the previous month, because no exception
Displays information about memory usage of Java processes.
Jmap pid # print the summary of memory usage
Jmap-heap pid # Java heap Information
Jmap-histo: Live pid # count, which indicates that
Jmap-histo pid> mem.txt # print simple information
About GC, a copy of the picture about Spring Festival
Before introducing GC, it is necessary to first understand the JVM memory division, so that it is easier to understand GC and various GC collector later.
The following figure shows others who are
1. nodes are removed from the cluster due to GC
This is because the JVM stops working during GC. If the GC time of a node is too long, the master ping3 times (the default Ping failure of Zen discovery is retried 3 times) will remove the node from
Document directory
Young (nursery): Young Generation
Old (Tenured): Age
Permanent: Permanent generation
Young (nursery): Young Generation
Old (Tenured): Age
Permanent: Permanent generation
Some time ago, another out of swap (out of swap
Master three garbage algorithms, seven garbage collectors, and learn what garbage collection algorithms are used for each garbage collector, as well as knowledge points about SafePoint.garbage Collection Algorithm1. Tag-purge algorithm
How the Java GC works, how to optimize GC performance, and how to interact effectively with the GCA goodJavaProgrammers must understandGC, how to optimize GC performance, how to interact effectively with GC, because some applications have higher
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.