JVM learning Summary

Source: Internet
Author: User
1. Relationship between JDK, JRE, and JVM. JDK includes JRE and other development tool libraries such as compiler, debugging, jconsele performance testing tools, etc.
2. Composition of JVM: The Class Loader subsystem, execution engine, and runtime data zone, such:
 
3. Composition of runtime data zones in JVM specifications:
(1) Method Area: stores metadata such as class information, static variables, constant pools, and threads.
(2) Heap: stores object instances, arrays, and other data, which are shared by threads.
(3) PC register, private thread
(4) JVM method stack, private thread
(5) local method stack, private thread
When Java Virtual Machine hotspot is implemented, the JVM method stack and the local method Stack are merged. The method zone is also called the persistent generation.
4. Garbage collection algorithm: Generation-based garbage collection. The life cycle of new generation objects is short based on the replication algorithm, and the life cycle of old generation objects is long. The method is implemented based on Mark cleaning or mark sorting.
5. JVM performance optimization: Key parameters:-XMS,-xmx,-xmn,-XX: Invalid vorratio,-XX: maxtenuringthreshold,-XX: permsize,-XX: maxpermsize
-XMS and-xmx are usually set to the same value to avoid continuous JVM memory expansion during runtime. This value determines the maximum memory that JVM heap can use.
-Xmn determines the size of the new generation space. The ratio of the New Generation Eden, S0, and S1 can be controlled through-XX: discounted vorratio (if the value is 4, EDEN: S0: s1 =)
-XX: the number of times the maxtenuringthreshold control object enters the old age after the minor GC. this parameter is only valid for serial GC.
-XX: permsize,-XX: maxpermsize is used to control the size of the Method Area, usually set to the same value.

JVM learning Summary

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.