s****y 发帖数: 503 | 1 我这两天在面试一个工作,他们好像遇到问题,可能现在的系统代码质量不高,GC每3
秒钟启动一次,他问我是不是修改JVM的参数可以解决,调正GC的young、old、
permanent的大小?我过两天要去面试,想准备一下,有人知道这是为什么吗?有什么
解决的途径? |
N*****m 发帖数: 42603 | 2 感觉是免费troubleshooting
3
【在 s****y 的大作中提到】 : 我这两天在面试一个工作,他们好像遇到问题,可能现在的系统代码质量不高,GC每3 : 秒钟启动一次,他问我是不是修改JVM的参数可以解决,调正GC的young、old、 : permanent的大小?我过两天要去面试,想准备一下,有人知道这是为什么吗?有什么 : 解决的途径?
|
s****y 发帖数: 503 | 3
这倒不是,因为是通过猎头
【在 N*****m 的大作中提到】 : 感觉是免费troubleshooting : : 3
|
z****e 发帖数: 54598 | 4 一种可能是过于频繁创建对象了,随便一个并发框架比如spring都能控制住,问问他们
用了什么轮子,自己乱写的很容易遇到这种问题,还有cloud的话内存别分配太多,gc
会很慢,问问3s启动的是大gc还是小gc,如果是小gc,有内存泄漏的可能,也有可能是
内存不够
:我这两天在面试一个工作,他们好像遇到问题,可能现在的系统代码质量不高,GC每
3
:秒钟启动一次,他问我是不是修改JVM的参数可以解决,调正GC的young、old、 |
w**z 发帖数: 8232 | 5 First all, understand the characteristic of the program with regard to the
object creation.
Take a heap dump and see what are those objects which trigger the GC.
Possible memory leak.
If the GC is youg gen gc, you can consider to increase the young gen, also
change SurvivorRatio. If it's the full gc, you will have to increase heap.
You can also turn on GC log and it helps.
3
【在 s****y 的大作中提到】 : 我这两天在面试一个工作,他们好像遇到问题,可能现在的系统代码质量不高,GC每3 : 秒钟启动一次,他问我是不是修改JVM的参数可以解决,调正GC的young、old、 : permanent的大小?我过两天要去面试,想准备一下,有人知道这是为什么吗?有什么 : 解决的途径?
|
g*****g 发帖数: 34805 | 6 Tweaking Xmx size, set Xms=Xmx would be where I start. In some case, object
pool is an effective way to reduce GC if there are lots of short-live
objects. Making the system scale out is another way that can solve the issue
indirectly.
【在 w**z 的大作中提到】 : First all, understand the characteristic of the program with regard to the : object creation. : Take a heap dump and see what are those objects which trigger the GC. : Possible memory leak. : If the GC is youg gen gc, you can consider to increase the young gen, also : change SurvivorRatio. If it's the full gc, you will have to increase heap. : You can also turn on GC log and it helps. : : 3
|
c*********e 发帖数: 16335 | 7 啥也别说了,让他们增加内存先。
3
【在 s****y 的大作中提到】 : 我这两天在面试一个工作,他们好像遇到问题,可能现在的系统代码质量不高,GC每3 : 秒钟启动一次,他问我是不是修改JVM的参数可以解决,调正GC的young、old、 : permanent的大小?我过两天要去面试,想准备一下,有人知道这是为什么吗?有什么 : 解决的途径?
|
y******u 发帖数: 804 | 8 Write to this mailing list [email protected]
/* */
A bunch of GC experts and contributors including myself will answer it. Be
prepared to have your configurations and gc logs. |
f*******t 发帖数: 7549 | 9 分析heap dump看什么object创建的多 |
J******a 发帖数: 5 | 10 gc频繁启动很正常啊,java不就是这样design的么。。是不是说full gc频繁?如果是
的话可以先看看是不是heap调的太小了,或者profile一下程序看看有没有大的object
没有清理掉,比如List用完了没有释放什么的。最解决问题的还是系统的profiling,
这个可以试下jprofiler什么类似的工具。gc的参数也可以调但是个人经验用处不是特
别的大。有调的时间不如直接买块内存加上去合算。 |