当前位置:网站首页>JVM调优中的一些常见指令
JVM调优中的一些常见指令
2022-07-27 03:22:00 【#小苏打】
设置垃圾回收器
-XX:+UseSerialGC: 使用串行收集器
-XX:+UseParallelGC: 使用并行收集器
-XX:+UseParalledlOldGC: 使用并行年老代收集器
-XX:+UseConcMarkSweepGC 使用CMS收集器-XX:+UseG1GC 使用G1收集器
堆设置
-Xms: 初始堆大小
-Xmx: 最大堆大小
-XX:NewSize=n: 设置新生代代大小
-XX:NewRatio=n: 设置年轻代和年老代的比值。如:为3,表示年轻代与年老代比值为1:3,
-XX:SurvivorRatio=n:年轻代中Eden区与两个Survivor区的比值。注意Survivor区有两个。如:3,表示Eden:Survivor=3:2,一个Survivor区占整个年轻代的1/5
-XX:MaxPermSize=n: 设置持久代(元空间)大小
垃圾回收器日志
-XX:+PrintGC idea输出垃圾回收信息
-XX:+PrintGCDetails idea输出详细垃圾回收信息
-XX:+PrintGCTimeStamps
-Xloggc:D:\钉钉\1.txt (filename) 将日志打印到设置路径中
并行收集器设置
-XX:ParallelGCThreads=n:设置并行收集器收集时使用的CPU数。并行收集线程数。
-XX:MaxGCPauseMillis=n:设置并行收集最大暂停时间(G1垃圾回收器可以使用)
-XX:GCTimeRatio=n:设置垃圾回收时间占程序运行时间的百分比。公式为1/(1+n)-XX:+UserAdaptiveSizePolicy 设置 Parallel Scavenge 收集器具有自适应调节策略。
并发收集器设置
-XX:+CMSIncrementalMode:设置为增量模式。适用于单CPU情况。
-XX:ParallelGCThreads=n:设置并发收集器年轻代收集方式为并行收集时,使用的CPU数。并行收集线程数。
判断OOM内存溢出
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=d:\dump
边栏推荐
- A. Parkway Walk
- 括号的最大嵌套深度
- Elastic开源社区:开发者招募
- Daily question 1: parity tree
- Golang jwt跨域鉴权
- Subject 3: Jinan Zhangqiu line 6
- 3381. Mobile keyboard (Tsinghua University postgraduate entrance examination machine test question)
- C language learning notes - memory management
- 2022危险化学品生产单位安全生产管理人员考试题模拟考试题库模拟考试平台操作
- JS to realize page Jump and parameter acquisition and loading
猜你喜欢
随机推荐
[OBS] dynamic bit rate: bit rate estimation
《MySQL》认识MySQL与计算机基础知识
Ant JD Sina 10 architects 424 page masterpiece in-depth distributed cache from principle to practice pdf
List Simulation Implementation
微服务化解决文库下载业务问题实践
Big talk · book sharing | lean product development: principles, methods and Implementation
Restful Fast Request 2022.2.2发布,支持批量导出文档
搜索旋转排序数组
商业打假系列之第一百之--无聊的制度和管理流程真的可以扔进垃圾桶-顺便分析十几个无用的Unity游戏自检项目
每日一题:从链表中删去总和值为零的连续节点
spicy之evt接口定义文件
二叉树的坡度
基于风能转换系统的非线性优化跟踪控制(Matlab代码实现)
tcp协议知识详解
Interview question 16.05 factorial mantissa
Development of NFT digital collection system: Xiaoyi digital intelligence helps brands launch NFT with one click on the chain
452 pages, 130000 words, the overall solution of modern smart Township Xueliang project 2022 Edition
括号的最大嵌套深度
线上一个隐匿 Bug 的复盘
暑假加餐|有钱人和你想的不一样(第5天)+电力系统潮流仿真(文档和Matlab代码)
![Article main content extraction software [based on NLP technology]](/img/1c/7c1b0e9bc9af62308f4124104f6110.png)








