当前位置:网站首页>JVM foundation - > what is STW?
JVM foundation - > what is STW?
2022-06-12 22:09:00 【Ouhuang xiaodezi】
What is? STW?
STW: Stop-The-World: It's in the garbage collection algorithm ⾏ In the process , takeJVM Memory freezes, application stalls ⼀ States.
- stay STW State, ,JAVA Of
All threads are stopped ⽌ Of board ⾏ Of -> GC Except for threads - once Stop-the-world happen , except GC Out of thread required , Other threads will stop working , Thread interrupted until GC The end of the mission to continue their mission .
- STW Is inevitable ,
Garbage collection algorithm ⾏There will be STW, All we have to do is reduce the pause time - GC The focus of various algorithm optimization , Namely
Reduce STW( Pause ), At the same time, it's also JVM Focus of tuning .
When to enter STW state ?
Reachability analysis algorithmEnumerate root nodes in (GC Roots) It will lead to all Java Execution thread pause , Get intoSTW state
Why do we have to STW Reason for pause ?
- Analytical work
Must be in a way that ensures consistencyIn a snapshot of - Consistency means that the whole execution system appears to be frozen at a certain point in time during the whole analysis period
- If during the analysis
Object reference relationships are still changing, Of the analysis resultsAccuracy cannot be guaranteed By STW Interrupted application threadsIt will be finished in GC Then recover , Frequent interruptions can make users feel stuck- So we need to reduce STW Happen , It is equivalent to trying to find a way
Reduce GC The frequency of garbage collection - STW Status and which one to use GC Collector independent ,
be-all GC Collectors have this state , Because to ensure consistency. - But OK GC The collector can reduce the pause time
Reduce STW( Pause )andReduce GC The frequency of garbage collectionIs the focus of tuning
If the system gets stuck obviously , The big probability is
Frequent execution GC Garbage collection , Enter frequently STW The reason why the state stops
give the thumbs-up , handsome young man !!!
边栏推荐
- 【QNX Hypervisor 2.2 用户手册】4.4 构建Host
- Step by step evolution of restful API version Frankel
- #yyds干货盘点# 解决剑指offer:字符流中第一个不重复的字符
- [data analysis] data clustering and grouping based on kmeans, including Matlab source code
- What is your understanding of thread priority?
- 设计消息队列存储消息数据的 MySQL 表格
- June training (day 10) - bit operation
- February 27th
- PE安装win10系统
- Qt Quick 3D学习:鼠标拾取物体
猜你喜欢

Things about the kotlin collaboration process - pipeline channel

Dolphin-2.0.3 cluster deployment document

建立高可用的数据库

Mr. Sun's version of JDBC (21:34:25, June 12, 2022)

SQL query list all views in SQL Server 2005 database - SQL query to list all views in an SQL Server 2005 database

Audio and video technology development weekly 𞓜 234

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

Use group_ Dplyr issues when using group_ by(multiple variables)

How to write a vscode plug-in by yourself to realize plug-in freedom!

关于 安装Qt5.15.2启动QtCreator后“应用程序无法正常启动0xc0000022” 的解决方法
随机推荐
Ansible summary (VI)
同花顺能开户吗,在同花顺开户安全么,证券开户怎么开户流程
【概率论与数理统计】期末复习抱佛脚:公式总结与简单例题(完结)
Unity commonly used 3D mathematical calculation
“Oracle数据库并行执行”技术白皮书读书笔记
Ansible PlayBook et ansible roles (3)
SQL tuning guide notes 12:configuring options for optimizer statistics gathering
MySQL introduction and installation (I)
Recommended Chinese font in the code input box of Oracle SQL developer
Ansible roles project case (IV)
NiO User Guide
【图像去噪】基于三边滤波器实现图像去噪附matlab代码
June training (day 12) - linked list
PCB封装下载网站推荐及其详细使用方法
How to write a vscode plug-in by yourself to realize plug-in freedom!
Interpretation of OCP function of oceanbase Community Edition
Yyds dry goods inventory solution sword finger offer: the first non repeated character in the character stream
[QNX hypervisor 2.2 user manual] 4.4 build host
[Jianzhi offer simple] Jianzhi offer 06 Print linked list from end to end
The kotlin coroutine -- coroutine context and exception propagation