当前位置:网站首页>JVM——》CMS
JVM——》CMS
2022-04-22 04:46:00 【Xiaoxian.】
One 、 Concept
CMS:Concurrent Mark Sweep
CMS A collector is a way to get Minimum recovery pause time Collector for target .
Two 、 Algorithm
Mark - eliminate
3、 ... and 、 The process ( step )
Because in the whole process , Concurrent tagging and concurrent cleanup , Collector threads can work with user threads , So in general ,CMS The collector's memory recovery process is executed concurrently with the user thread .

1、 Initial marker CMS initial mark 【STW】
Mark GC Roots Directly associate objects , no need Tracing, fast , yes STW Of
2、 Concurrent Tags CMS concurrent mark【 Concurrent 】
Conduct GC Roots Tracing , Find the remaining objects in the reference chain , It's concurrent
3、 Re label CMS remark 【STW】
Modify the content of concurrent tags due to user program changes , Relabel incremental garbage , yes STW Of
4、 Concurrent elimination CMS concurrent sweep 【 Concurrent 】
Clear unreachable objects to reclaim space , At the same time, new garbage is generated , Save it for the next clean-up called floating trash
Four 、 excellent vacancy
advantage : Concurrent collection 、 Low pause
shortcoming : Generate a lot of space debris 、 The concurrent phase reduces throughput
5、 ... and 、 Be careful
1、 Whether the initial tag is single threaded or multi-threaded ?
answer : according to JDK edition
<=JDK7, The initial tag defaults to Single thread ( Multithreading incurs additional threading overhead )
>=JDK8, The initial tag defaults to Multithreading ( The system thinks it's multithreaded code )
2、 Retag whether it's single threaded or multi-threaded ?
answer : Re marking is Multithreading
reason : Multithreading has been created during concurrent marking , There is no additional thread overhead for re tagging , Use multithreading directly
3、 Improve efficiency by setting the initial flag
Premise :JDK8,CMS, The business is single threaded ( The application is single threaded )
adjustment : Set the initial flag to single threaded , Improve garbage collection efficiency
版权声明
本文为[Xiaoxian.]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210804555996.html
边栏推荐
- [selenium] yaml data driven
- win10卡顿修复
- JVM tuning notes
- How can devices of different brands be compatible and interconnected? Yiwen teaches you to understand
- Error encountered when installing opencv
- 【板栗糖GIS】arcmap—模型构造器—批量裁剪栅格数据
- 【板栗糖GIS】supermap—如何为数据制造超链接
- 22.4.21 learning comprehension
- 11. Libevent tests horizontal trigger and edge trigger
- Vue project NPM run build when packaging the project, time stamp the version number of CSS and JS files to prevent the browser from caching
猜你喜欢

How can devices of different brands be compatible and interconnected? Yiwen teaches you to understand

2022T电梯修理考试试题及在线模拟考试

kaggle實戰4.1--時間序列預測問題

【板栗糖GIS】arcmap—如何将多张影像合并成一张

Solution to Chinese translation of GoLand (in case of failure to download plug-ins)

Mui pop up menu
Apple plans to expand children's information and communication security features to the UK and Canada

7_ Data analysis - Evaluation

Setting method of parameters such as color and linetype of MATLAB curve

Deployment of web server, personal experience
随机推荐
14.buffferevent超时事件处理
仿真生成随机数计算生成每个同学生日
2022t elevator repair test questions and online simulation test
vue项目 npm run build 打包项目时为css、js文件加时间戳版本号,防止浏览器缓存
Leetcode sword finger offer 15 Number of 1 in binary
2022g2 boiler operator certificate examination question bank and online simulation examination
Mapbox creates multiple draggable marker points
2022A特种设备相关管理(电梯)考试题模拟考试题库模拟考试平台操作
Sharing of enterprise data leakage prevention scheme
Climb the actor's name and add a link
2022 P cylinder filling training questions and answers
[selenium] yaml data driven
【板栗糖GIS】arcmap—如何制作带缓冲区的图幅结合表
STL的unique函数返回值
Peer interview sharing Lenovo WinForm direction 20220420
Leetcode sword finger offer 22 The penultimate node in the linked list
13.bufferevent接受和发送数据
15. Bufferevent client test connection server
JVM tuning notes
CPU调用进程的方式