当前位置:网站首页>ZGC message type and trigger time
ZGC message type and trigger time
2022-06-09 06:24:00 【lixia0417mul2】
gc Message type
Trigger zgc There are two types of messages for , One is synchronous message , One is asynchronous message , For synchronous messages , The thread that triggers the synchronization message waits gc You can't continue running until you're done , such as System.gc The message of is a synchronous message , The application thread needs to wait gc You can't continue running until you're done , When the last synchronization message triggered gc It is still in progress, and then another synchronization message request is received , Will trigger in sequence gc, Asynchronous messages are message types that are triggered by similar fixed trigger intervals , When caused by the last asynchronous message gc While it's still going on , If you receive another request for an asynchronous message , That will ignore new asynchronous messages , That is, asynchronous messages will be de duplicated
Synchronization message trigger timing
System.gc It is a synchronous message sending method triggered actively in the code , This is what developers think jvm At this time, the garbage has reached the point of cleaning up , So it will trigger gc, Because it is a synchronous message type , Only gc After the end ,System.gc Later code can continue to execute
Asynchronous message trigger timing
1. Trigger at regular intervals
ZCollectionInterval Parameter controls the fixed time interval for triggering asynchronous message garbage collection , Give Way gc Triggered at a fixed frequency , For example, the trigger is fixed every morning gc, In this way, it is not easy to wait for peak traffic during the day gc 了
2.jvm The warm-up rule is triggered at startup
jvm Just started , Triggered by historical data gc The rules , Therefore, the trigger rules at startup are designed , Specifically, when jvm Heap memory reached... At startup 10%,20%,30% Will trigger asynchronism gc news , But when the startup process is over , This rule will not be satisfied again
3. Triggered according to the allocation rate
zgc The runtime will collect data from the past gc frequency ,gc Time , Program memory allocation rate , Parameters such as free memory of heap memory , The purpose is to predict when the heap memory space will be exhausted according to the free heap memory and the program memory allocation rate , such gc It can be triggered in advance before the heap memory is about to run out gc operation , Avoid entry oom. By the way , This rule predicts the next gc The trigger time can be predicted using the linear regression model of machine learning .
This gc Triggering rules do not require any parameter control , It exists and is enabled by default
4. Active trigger rules
adopt ZProactive Parameter to control whether the active trigger rule is enabled , Default on , The active trigger rule means that the sending will be triggered when the following conditions are met gc Asynchronous messaging , Conditions 1 From the last time gc Recycle to current time , The heap memory usage of the application has increased by more than 10% The heap memory size of , Conditions 2 Is the time from the last process to the current time , Time has passed 5 minute , When the above two conditions are met, the asynchronous gc Sending of messages
Meta space allocation trigger rule
When sending meta space memory allocation fails , It will be sent first gc Asynchronous message triggers gc Recycling , If it can, it will reclaim enough meta space memory , Then return to success , Otherwise, send a synchronization message to trigger gc Recycling operations , If you can reclaim enough meta space memory , Then return to success , Otherwise, try to expand the Metaspace memory , Then allocate the memory .
边栏推荐
- 全志V3s学习记录--ESP8089的使用
- Ping: xxx: unknown name or service reason analysis
- yum 命令Error: rpmdb open failed
- C entrustment related
- TypeScrtipt 中的模块化
- El table sets the height, and the header is misaligned
- 内核中的互斥与同步
- The national industrial level Quanzhi t3/a40i core board -com-x40i helps the intelligent power system
- Encounter nodejs
- Shopify theme style development
猜你喜欢

CodeBlocks老是重复运行上一次结果

error: subprocess-exited-with-error(fasttext)

卷积神经网络概述以及简单案列

自然语言之文本预处理

小米4安装微信失败

Coredns part 2- compiling and installing external plugins

Transplant qt5.12 to t507 development board

Lazy counter

全志平台BSP裁剪(2)附件一 General setup配置说明

Analysis and Discussion on security level of 6-bit password lock
随机推荐
NLP基础之RNN基础
Office software batch startup procedure
error: subprocess-exited-with-error(fasttext)
性价比最高处理器和国产处理器I.MX6UL/A40I/T3对比
Dropout regularization
Itop-2k1000 development board startup ramdisk production startup USB flash disk
unity3d 更换项目字体
No cache installation instructions
(cobbler) partition problem and solution 2
Sqlserver imports and exports data. There is a process in the background and no display in the foreground.
你真的懂熵了吗(含交叉熵)
RNN foundation of NLP Foundation
你真的懂熵了嗎(含交叉熵)
[early spring 2022] [leetcode] 45 Jumping game II
全志平台BSP裁剪(1)kernel裁剪--调试工具和调试信息的裁剪
LDAP application: openldap integrated into jumpserver
Solution d'instructeur de robot basée sur l'enregistrement complet a40i fabriqué en Chine
Complex process mining technology hidden behind civilian products - an exclusive interview with chaiyatuan, founder of Rongzhi information
C # covariant inverter
Etc. sudo permission configuration