配置jvm参数(ConfiguringtheJVMparameter)

更新时间:2023-06-04 11:08:48 阅读: 评论:0

配置jvm参数(Configuring the JVM parameter)Configuring the JVM parameter
This article will teach you how to configure JVM parameters, and JVM provides a large number of command line arguments that you can print down for future reference. Finally, we will explain how to tune.
/usr/local/jdk/bin/java -Dresin.home=/usr/local/resin
-rver -Xms1800M -Xmx1800M -Xmn300M -Xss512K
食物的英语-XX:PermSize=300M -XX:MaxPermSize=300M -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=5 -XX:GCTimeRatio=19 -Xnoclassgc -XX:+DisableExplicitGC -XX:+ UParNewGC
-XX:+UConcMarkSweepGC -XX:+UCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0
-XX:-CMSParallelRemarkEnabled作文900字
-XX:CMSInitiatingOccupancyFraction=70
女生壁纸
-XX:SoftRefLRUPolicyMSPerMB=0 -XX:+PrintClassHistogram
-XX:+PrintGCDetails -XX:+ PrintGCTimeStamps
-XX:+PrintHeapAtGC -Xloggc:log/gc.log
英语高考高频词汇Heap size ttings
The maximum heap size in JVM has three limitations: the data model of the underlying operating system (32-bt or 64-bit); the system's available virtual memory limitations; the system's physical memory limitations. 32 bit system, generally limited to 1.5G~2G; 64 for the operating system, no restrictions on memory. I tested in the Windows Server 2003 system, 3.5G physical memory, JDK5.0, the maximum can be t to 1478m.
Typical JVM parameter ttings:
Java, -Xmx3550m, -Xms3550m, -Xmn2g, -Xss128k
-Xmx3550m: t JVM, the maximum available memory is 3550M.
秋天的夜晚作文
-Xms3550m: tting JVM caus memory to be 3550m. This value can be t the same as -Xmx to avoid redistribution of memory after each garbage collection has been completed by JVM.
-Xmn2g: t the young generation size to 2G. The entire heap size = younger generation size + older generation size + persistent generation size. The permanent generation general fixed size 64M, so increa the young generation, will reduce the old generation of small size. This value has a greater impact on system performance, and the Sun official recommendation is configured as the 3/8 for the entire heap.
-Xss128k: ts the stack size for each thread. After JDK5.0, each thread stack size is 1M, and each previous thread stack size is 256K. The memory size of more applied threads needs to be adjusted. In the same physical memory, reducing this value generates more threads. However, the operating system is limited to the number of threads within a process, and can not be unlimited generated, the experience value is about
3000~5000.
周定王陵Java, -Xmx3550m, -Xms3550m, -Xss128k, -XX:NewRatio=4,
-XX:SurvivorRatio=4, -XX:MaxPermSize=16m,
-XX:MaxTenuringThreshold=0
-
XX:NewRatio=4: ts the ratio of younger generations (including Eden and two Survivor zones) to older generations (except for persistent generations). Set to 4, the ratio between the younger generation and the older generation was 1:4, and the younger generation accounted for 1/5 of the entire stack
-XX:SurvivorRatio=4: ts the size ratio between the Eden region and the Survivor zone in the younger generation. Set to 4, the ratio between the two Survivor regions and one Eden region is 2:4, and a Survivor region accounts for 1/6 of the entire young generation
-XX:MaxPermSize=16m: ts the persistence generation size to 16m.龟山公园
-XX:MaxTenuringThreshold=0: t the maximum age for garbage. If it is t to 0, the younger generation will not go through the Survivor area and go directly to the older generation. For older generations, more applications can improve efficiency. If this value is t to a larger value, the young object will be replicated veral times in the Survivor area, which will increa the survival time of the object's younger generation, and increa the overview of the recovery in the younger generation.
whether的用法Recycle bin lection
JVM has three choices: rial, parallel and concurrent collector collector collector, but the rial collector is only suitable for small amount of data, so the choice here mainly for parallel and concurrent collector collector. By default,
JDK5.0 ud to u rial collectors, and if you want to u other collectors, you need to add parameters at boot time. After JDK5.0, JVM will be judged by the current system configuration.
Throughput priority parallel collector
As mentioned above, parallel collectors mainly aim at reaching a certain throughput, suitable for scientific and technical background processing and so on.
Typical JVM parameter configuration:
Java, -Xmx3800m, -Xms3800m, -Xmn2g, -Xss128k,
-XX:+UParallelGC, -XX:ParallelGCThreads=20
-XX:+UParallelGC: lect garbage collector as parallel collector. This configuration is only valid for younger generations. That is, under the above configuration,
Younger generations ud concurrent collection, while older generations still ud rial collection.
-XX:ParallelGCThreads=20: the number of threads that configure the parallel collector, that is, how many threads do garbage collection at the same time. This value is best configured equal to the number of processors.
Java, -Xmx3550m, -Xms3550m, -Xmn2g, -Xss128k,
-XX:+UParallelGC, -XX:ParallelGCThreads=20,
-XX:+UParallelOldGC
-XX:+UParallelOldGC: configure older generations of garbage collection methods for parallel collection. JDK6.0 supports parallel collection of older generations.
Java, -Xmx3550m, -Xms3550m, -Xmn2g, -Xss128k,
-XX:+UParallelGC, -XX:MaxGCPauMillis=100
-XX:MaxGCPauMillis=100: ts the maximum amount of garbage that will be recycled every youn
g generation. If this time is not met, JVM will automatically adjust the size of the young generation to meet this value.
Java, -Xmx3550m, -Xms3550m, -Xmn2g, -Xss128k,
-XX:+UParallelGC, -XX:MaxGCPauMillis=100,
-XX:+UAdaptiveSizePolicy
-XX:+UAdaptiveSizePolicy: when this option is t, the parallel collector will automatically lect the size of the young generation and the corresponding Survivor area ratio, in order to achieve the minimum respon time target system is specified or collection frequency, this value suggests the u of parallel collector, has been opened.
Concurrent collector in respon to time priority
As mentioned above, concurrent collectors mainly guarantee the respon time of the system and reduce the pau time during garbage collection. Applicable to application rver, telecom field, etc..
Typical JVM parameter configuration:

本文发布于:2023-06-04 11:08:48,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/859300.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:配置   女生   高考   龟山   参数
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图