JVM tuning summary, jvm Tuning
Auxiliary InformationJVM provides a large number of command line parameters and prints information for debugging. There are mainly the following:
-XX: + PrintGCOutput Format: [GC 118250 K-> 113543 K (130112 K), 0.0094143 secs][Full GC 121376 K-> 10414 K (130112 K), 0.0650971 secs]
-XX: + PrintGCDetailsOutput Format: [GC [DefNew: 8614 K-> 781 K (9088 K), 0.0123035 secs] 1
When executing a Java program, the Java Virtual Machine divides the memory it manages into several different data regions. These regions have their own purposes, as well as the creation and destruction time. Some regions exist with the startup of virtual machine processes, some regions are created and destroyed Based on the startup and termination of the user's thread. The memory managed by the Java Virtual Machine will include several runtime data regions, as shown in:650) This. width = 650; "s
Oom?Java.lang.OutOfMemoryError:java head space heap memory overflowJava.lang.OutOfMemoryError:Permgen Space Java Eternal Overflow, that is, methods to overflow, generally because of the emergence of a large number of classes and JSPs, or the use of Cglib reflection mechanism,This can be resolved by changing the size of the method area and modifying it in the form of a similar-xx:permsize=64m-xx:maxpermsize=256m. In addition, too many constants, especially strings, can cause the method area to ov
Comparison between Dalvik Virtual Machine and JVM: Dalvik Virtual Machine JVM
The Dalvik virtual machine has many similar features as the Java Virtual Machine, including GC, JIT, and JNI. The main difference is that the file format and instruction set are different, and the features of the two are compared and discussed below.Difference1: File Format
Dalvik's virtual machine files use the dex format, while
Let's talk about the JVM class loading mechanism and jvm loading mechanism.
I wrote this article a few months ago to deeply understand the Java class loading principle. I briefly talked about my understanding of Java class loading. Recently, I also studied the book "deep understanding of Java virtual machines, I have a more systematic understanding of the JVM cl
Java basic questions (JVM), java basic questions jvm
1. What is a Java Virtual Machine? Why is Java called a platform-independent programming language "?
A Java virtual machine is a virtual machine process that can execute Java bytecode. Java source files are compiled into bytecode files executed by Java virtual machines.
Java is designed to allow applications to run on any platform without the need for pro
Based on common JVM garbage collection algorithms, jvm garbage collection
There are four common garbage collection algorithms in JVM:
Mark-clearing algorithm (Mark-Sweep );
Copying );
Mark-Compact );
Generational collection;
Next we will introduce them one by one:
I. Mark-clearing algorithm (Mark-Sweep)
This is the most basic garbage collection algorithm. The alg
JVM-program compilation and code early (during compilation) optimization, jvm-CompilationEarly (Compilation) Optimization
I. Javac Compiler
1. Javac source code and debugging
The source code of Javac is stored in JDK_SRC_HOME/langtools/src/shares/classes/com/sun/tools/javac. Besides JDK APIs, only the code in JDK_SRC_HOME/langtools/src/shares/classes/com/sun/* is referenced. The debugging environment is sim
A rough understanding of JVM and JVM
1. How Java is cross-platform
Java compiles source code into a Class file based on bytecode. bytecode is a file stored in bytes and is combined with cross-platform. It is a set of virtual commands that describe the program to run, this virtual command has nothing to do with any platform. The Java Virtual Machine knows it and the Java Virtual Machine translates it into co
The individual believes that JVM tuning is primarily addressed by the following methods1. Set the appropriate maximum heap memory (maximum and value for Cenozoic and Laosheng generations) and minimum heap memory (the operating system memory size consumed by JVM startup), and set the scale allocation of the heap.2, set up the suitable new generation because of its impact on the system performance and GC reco
Export JVM memory information on CentOS, and export jvm memory from centosFirst, check the Tomcat process Id:
[root@iZ25Z ~]# ps aux | grep javawww 2111 4.0 23.5 1637648 452756 ? Sl 10:12 4:35 /usr/java/jdk1.7.0_80/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties ... We can see that the Tomcat process Id is 2111, and then use the JDK built-in tool jmap to e
Error: cocould not open... jvm. cfg solution, cocould... jvm. cfgThis is mostly because JDK has been installed on the computer. After you uninstall and reinstall it, an error occurs when you run the java command: cocould not open... jvm. cfg.
Open the system environment variable and view the PATH. The following configuration information is displayed:
% SystemRoot
Pgc:perm generation (bytes)S0: The first survivor (Survivor area) of the young generation has been used as a percentage of current capacityS1: The second survivor (Survivor area) in the younger generation has been used as a percentage of current capacityE: Eden (Eden) in the young generation has been used as a percentage of current capacityPercentage of current capacity used by O:old generationPercentage of current capacity used by P:perm generationS0CMX: Maximum Capacity (bytes) of the first S
GC mechanism: Allocating an object using the new keyword; when releasing an object, the program cannot access the object again, as long as it is assigned NULL to all references to the object, and we call the object "unreachable." The GC is responsible for reclaiming the memory space of all "unreachable" objects.
JVM Tuning Method:
1. The most basic advice is to release the references to unwanted objects as soon as possible.
Most programmers use tempor
class execution mechanism
The JVM executes class bytecode based on the stack architecture, and after the thread is created, the program counter (PC) and stack (stack) are generated.
The PC holds the offset of the next executed instruction within the method, the stack holds a stack frame, each stack frame corresponds to each call of each method, and the stack frame holds local variables and the operand stack
The structure of the stack
JVM-class file full parsing-method table set, jvm-class setMethod table set
The previous magic number, minor version number, main board number, constant pool entry, constant pool, access flag, class index, parent index, interface index set, and field table set, then the method table will be followed.
The method table is constructed like a field table, which contains several items in sequence: access_flags,
JVM-class file full parsing-Attribute Table set, jvm-class setAttribute Table set
In front of magic number, minor version number, main board number, constant pool entry, constant pool, access flag, class index, parent index, interface index set, field table set, method table set, the next step is the set of attribute tables.
In the class file, field tables, and method tables, you can carry your own attribu
JVM-concurrency-Java memory model, jvm-concurrency-java modelJava Memory Model
(1). Master memory and working memory
The Java Memory Model specifies that all variables are stored in the primary memory.
Copies of the primary memory of each type of thread variables. All operations (read operations, value assignment operations, etc.) of the thread on the variables must be performed in the working memory, rathe
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.