当前位置:网站首页>G1 important configuration parameters and their default values in the garbage collector
G1 important configuration parameters and their default values in the garbage collector
2022-06-28 13:12:00 【Code Marathon】
-XX:MaxGCPauseMillis
Expected maximum GC Pause time , The default is :200ms.
Be careful :G1 The default policy for is to expect a balance between throughput and latency , So if you want to get higher throughput , Then you can reduce GC The frequency of pauses , And less GC The main way to increase the pause frequency is to increase the maximum GC Pause time .
-XX:GCPauseTimeInterval
The target of the maximum pause interval .
By default ,G1 Don't set any goals , allow G1 In extreme cases, garbage collection is performed continuously .
-XX:ParallelGCThreads
Maximum number of threads used for parallel work during garbage collection pauses .
By default, it runs according to JVM The number of threads available on the computer determines , Calculation method : When the process is available CPU The number of threads is less than or equal to 8 when , Then use this number directly , otherwise , Set to :8 + (n - 8) * (5/8) .
At each pause , The maximum number of threads used also needs to consider the maximum heap limit , The parameter :-XX:HeapSizePerGCThread.
-XX:ConcGCThreads
Maximum number of threads for concurrent work , By default , This value is :-XX:ParallelGCThreads Divide 4.
If you want to be able to complete concurrent markup faster , You can appropriately increase the number of threads marked concurrently .
-XX:+G1UseAdaptiveIHOP
Use adaptive IHOP.
Initiating Heap Occupancy Percent( Threshold to trigger concurrent start collection ),G1 Automatically determine the best by observing how long the tag takes and how much memory is usually allocated to older generations during the tag cycle IHOP, This feature is called adaptation IHOP.
If this function is enabled , be G1 Will use -XX:InitiatingHeapOccupancyPercent=45 The value of is used as the threshold for concurrent startup collection .
If G1 There is no good prediction , The age occupancy rate that triggers the concurrency flag , It is recommended to disable :-XX:-G1UseAdaptiveIHOP, And self adjust -XX:InitiatingHeapOccupancyPercent The threshold of .
-XX:G1HeapRegionSize
G1 Each one of them Region Size .
The default is based on the maximum heap size , Divided by 2048 individual region To calculate each region Size , The maximum value determined according to ergonomics is 32M, The user-defined range is 1~512M, And it must be 2 The power of .
-XX:G1NewSizePercent、-XX:G1MaxNewSizePercent
The size of heap memory occupied by the new generation , For the initial -XX:G1NewSizePercent Set the value of the , The default is :5%,G1 The proportion will be adjusted according to the value satisfying the pause time , But not more than -XX:G1MaxNewSizePercent Set the value of the , The default is :60%.
-XX:G1HeapWastePercent
For more efficient garbage collection ,G1 From Collection Set Choose to free some memory space gain greater region, One of the references is that the recoverable space should be larger than XX:G1HeapWastePercent Set the value of the , The default is :5%, Represents the current heap space 5%.
-XX:G1MixedGCCountTarget
In the mixed recycling phase ,G1 Expect to maximize the recycling , But it also needs to be considered XX:MaxGCPauseTimeMillis, Therefore, a large mixture is usually recycled , Split into multiple , This number is determined by XX:G1MixedGCCountTarget decision , The default is :8 Time , This reduces the pause time for each hybrid recycle , In order to achieve XX:MaxGCPauseTimeMillis The target value .
-XX:G1MixedGCLiveThresholdPercent
In the mixed recycling phase , Avoid recycling things that take a lot of time to process region, So if the identification needs a lot of time to process ? So in most cases , High occupancy region It takes more time to deal with ,XX:G1MixedGCLiveThresholdPercent This is the threshold value set for the occupancy rate of living objects , The default is :85%, That is, if one region The proportion of surviving objects in the total population reaches this re-XX:GCPauseTimeInterval= < ERG >gion Of 85%, Then this will not be recycled region.
Be careful : The following three parameters , By default, it is determined in an ergonomic way according to the environment
-XX:GCPauseTimeInterval
-XX:ParallelGCThreads
-XX:ConcGCThreads
Ergonomics : Ergonomics is Java virtual machine (JVM) And garbage collection heuristics ( Such as behavior based heuristics ) The process of improving application performance .
边栏推荐
- flex布局中的align-content属性
- 数据分析-启动子进化分析
- Copy 10 for one article! The top conference papers published in South Korea were exposed to be plagiarized, and the first author was "original sin"?
- Online JSON to plaintext tool
- 为什么越来越多的用户放弃 Swagger,选择Apifox
- 深入理解贝叶斯定理
- FS7022方案系列FS4059A双节两节锂电池串联充电IC和保护IC
- 词云的可视化设计教程
- Realization of a springboard machine
- plt.savefig()的用法以及保存路径
猜你喜欢

From jsonpath and XPath to spl

mysql数据库扫盲,你真的知道什么是数据库嘛
JS class 并不只是简单的语法糖!

MySQL多表联合查询

An idea plug-in that automatically generates unit tests, which improves the development efficiency by more than 70%!

Vscode如何设置自动保存代码

弹性盒子自动换行小Demo

Mysql database literacy, do you really know what a database is

Copy 10 for one article! The top conference papers published in South Korea were exposed to be plagiarized, and the first author was "original sin"?

1015.摘花生
随机推荐
async-validator.js數據校驗器
Buuctf:[wustctf2020] plain
Mature case and source code of hash quiz game system development technology
Electronic components distribution 1billion Club [easy to understand]
PHP obtains the beginning and end time of the month according to the month and year
5A synchronous rectifier chip 20V to 12v2a/5v4.5a high current 24W high power synchronous rectifier chip high current step-down IC fs2462
【历史上的今天】6 月 28 日:马斯克诞生;微软推出 Office 365;蔡氏电路的发明者出生
Commonly used "redmine" for # test bug
How to solve the data inconsistency between redis and MySQL?
scratch旅行相册 电子学会图形化编程scratch等级考试一级真题和答案解析2022年6月
电子元器件分销10亿俱乐部[通俗易懂]
基于SSM实现水果蔬菜商城管理系统
Hisilicon 35xx realizes gt911 touch screen function "suggestions collection"
RK3399平台开发系列讲解(使用篇)Pinctrl子系统的介绍 - 视频介绍
Digital twin energy system, creating a "perspective" in the low-carbon era
codeblocks mingw安装配置问题
async-validator. JS data verifier
The English translation of heartless sword Zhu Xi's two impressions of reading
词云的可视化设计教程
Vs2012 VC creates a new blank window application