当前位置:网站首页>JVM foundation - > What garbage collectors does the JVM have?
JVM foundation - > What garbage collectors does the JVM have?
2022-06-12 22:09:00 【Ouhuang xiaodezi】
JVM What garbage collectors are there ?
The first stage :
Serial ( Serial ) The collector-> Time in JDK1.3 about
new ⽣ generation (Serial— Mark - Copy algorithm ) ⽼ years (SerialOld— Mark - Sorting algorithm ) -> The opening configuration is as follows ↓
-XX:+UseSerialGC
The second stage :
Parallel ( parallel ) The collector-> JDK 6 Only then did China begin to offer ,JDK 8 By default
Parallel Collector is also called throughput collector , Use multithreading to clean up garbage
new ⽣ generation (Parallel— Mark - Copy algorithm ) ⽼ years (ParallelOld— Mark - Sorting algorithm ) -> The opening configuration is as follows ↓
-XX:+UseParallelGC -XX:+UseParallelOldGC
The third stage :
CMS( Concurrent ) The collector-> JDK 5 appear ,JDK 9 Has been abolished CMS Garbage collector
CMS The collector Minor( The younger generation ) GC Time meeting
Pause all application threads, And in a multi-threaded way for garbage collection .In the old age GC when
No longer pause the application thread, Instead, several background threads are used to scan the space of the elderly on a regular basis , Recycle the objects that are no longer used in time .new ⽣ generation (ParNew— Mark - Copy algorithm ) ⽼ years (ConcMarkSweep— Mark - Clear algorithm ) -> The opening configuration is as follows ↓
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC
The fourth stage :
G1( Concurrent ) The collector-> JDK 8 Then widely used ,JDK 9 The default with G1 The collector
G1 The collector ( Or garbage priority collector ) The original intention of the design is to
Try to shortenHandle Super pile ( Greater than 4GB) A pause when .be relative to CMS In terms of the advantages of
Reduce memory fragmentation.Mark - Copy algorithm + Mark - Sorting algorithm -> The opening configuration is as follows ↓
-XX:+UseG1GC
Be careful :
parallel GC: Multiple garbage collection threads operate simultaneously
Concurrent GC: Garbage collection threads work with user threads
Serial GC: A garbage collection thread
give the thumbs-up , handsome young man !!!
边栏推荐
- JVisualVM初步使用
- Configuring Dingding notification of SQL audit platform archery
- 【图像去噪】基于三边滤波器实现图像去噪附matlab代码
- Economist focuses on WTO MC12: digital economy may become an important issue
- Ansible playbook和变量(二)
- List of open source alternative projects of world famous Cloud Service SaaS companies
- June training (day 11) - matrix
- February 27th
- [proteus simulation] simple digital tube timer clock
- Oracle SQL Developer的代码输入框中推荐使用的中文字体
猜你喜欢

SQL tuning guide notes 8:optimizer access paths

MySQL architecture and basic management (II)

Palindrome linked list and linked list intersection problem (intersecting with Xinyi people) do you really know?

Ansible PlayBook et ansible roles (3)

About the solution to "the application cannot start normally 0xc00000022" after qt5.15.2 is installed and qtcreator is started

Qt Quick 3D学习:鼠标拾取物体

Redis optimization
![[probability theory and mathematical statistics] final review: formula summary and simple examples (end)](/img/f5/1c8392aaf87ea323524e94e3f213ed.png)
[probability theory and mathematical statistics] final review: formula summary and simple examples (end)

“Oracle数据库并行执行”技术白皮书读书笔记

Ansible playbook and variable (II)
随机推荐
Database daily question --- day 10: combine two tables
Ansible foundation and common modules (I)
Ansible playbook和Ansible Roles(三)
接口测试工具apipost3.0版本对于流程测试和引用参数变量
大学期间零基础如何开展编程学习
数据库每日一题---第10天:组合两个表
Yyds dry goods inventory solution sword finger offer: the first non repeated character in the character stream
How do I create a daemon thread? And where to use it?
OceanBase 社区版 OCP 功能解读
Things about the kotlin collaboration process - pipeline channel
How to write a vscode plug-in by yourself to realize plug-in freedom!
Implementation of master-slave replication and master-master replication for MySQL and MariaDB databases
PCB封装下载网站推荐及其详细使用方法
Xingda easy control modbustcp to profibusdp
SQL tuning guide notes 8:optimizer access paths
Modstartcms modular station building system v3.3.0 component function upgrade, event triggering enhancement
SQL tuning guide notes 10:optimizer statistics concepts
Ansible-大总结(六)
List of open source alternative projects of world famous Cloud Service SaaS companies
Okio source code analysis