当前位置:网站首页>JVM调优实战
JVM调优实战
2022-08-02 02:18:00 【ndrandy】
调优原因:生产服务器4核16g,框架SpringBoot,当压测1小时左右时,出现很多次Full GC,GCT总时间也很大。 jvm启动参数:
-Xms10G -Xmx10G -Xmn3g
jdk1.8默认GC
问题分析:
老年代7G,会发生多次FullGC,说明老年代的内存慢慢上涨,但是不是内存泄漏,因为如果是内存泄漏,FullGC完应该会OOM。所以就分析老年代内存逐渐跑满的原因:
一个对象从Eden区创建,到Survivor区域,逃过15次GC,最终才能到老年代,这种老年代的对象,在FullGC发生时,也基本不会被回收。但是压测过程中出现的现象时老年代满了之后,FullGC会回收很大比例的垃圾对象,说明很多对象没逃过15次GC,直接跑到老年代了,所以接下来分析:什么情况对象会 “直接” 跑到老年代?
1、JVM设置了参数(-XX:PretenureSizeThreshold=1000000),大对象直接进入老年代。
2、Minor GC时,Survivor区域太小。
3、老年代内存本身比较小,Minor GC时,有概率触发Full GC
在笔者这里,情况1、3可以排除。只剩下2。
猜测原因:
UseAdaptiveSizePolicy参数导致Survivor动态调整到过小&#x
边栏推荐
- NAS和私有云盘的区别?1篇文章说清楚
- Personal blog system project test
- Outsourcing worked for three years, it was abolished...
- 【Unity入门计划】2D Game Kit:初步了解2D游戏组成
- CodeTon Round 2 D. Magical Array
- 【 wheeled odometer 】
- MySQL - CRUD operations
- NIO‘s Sword(牛客多校赛)
- 软件测试 接口自动化测试 pytest框架封装 requests库 封装统一请求和多个基础路径处理 接口关联封装 测试用例写在yaml文件中 数据热加载(动态参数) 断言
- 【LeetCode每日一题】——103.二叉树的锯齿形层序遍历
猜你喜欢
FOFAHUB usage test
Check if IP or port is blocked
Multi-Party Threshold Private Set Intersection with Sublinear Communication-2021:解读
工程师如何对待开源
ofstream,ifstream,fstream read and write files
LeetCode刷题日记:74. 搜索二维矩阵
Redis Subscription and Redis Stream
Chengdu openGauss user group recruit!
Data transfer at the data link layer
Use DBeaver for mysql data backup and recovery
随机推荐
2022-08-01 Install mysql monitoring tool phhMyAdmin
Use DBeaver for mysql data backup and recovery
TKU remembers a single-point QPS optimization (I wish ITEYE is finally back)
LeetCode刷题日记:74. 搜索二维矩阵
oracle查询扫描全表和走索引
2022-08-01 mysql/stoonedb慢SQL-Q18分析
Hiring a WordPress Developer: 4 Practical Ways
Remember a pit for gorm initialization
volatile原理解析
Scheduled tasks for distributed applications in Golang
leetcode / anagram in string - some permutation of s1 string is a substring of s2
2022-08-01 mysql/stoonedb slow SQL-Q18 analysis
【web】理解 Cookie 和 Session 机制
力扣(LeetCode)213. 打家劫舍 II(2022.08.01)
个人博客系统项目测试
C语言之插入字符简单练习
Reflex WMS Intermediate Series 7: What should I do if I want to cancel the picking of an HD that has finished picking but has not yet been loaded?
Handwriting a blogging platform ~ the first day
A good book for newcomers to the workplace
The failure to create a role in Dahua Westward Journey has been solved