-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add heap max ratio and force trigger #31
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
好建议,我看一下 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有几条review意见
java-oom/src/main/java/com/kwai/koom/javaoom/monitor/HeapThreshold.java
Outdated
Show resolved
Hide resolved
java-oom/src/main/java/com/kwai/koom/javaoom/monitor/HeapThreshold.java
Outdated
Show resolved
Hide resolved
java-oom/src/main/java/com/kwai/koom/javaoom/monitor/HeapMonitor.java
Outdated
Show resolved
Hide resolved
java-oom/src/main/java/com/kwai/koom/javaoom/monitor/HeapThreshold.java
Outdated
Show resolved
Hide resolved
java-oom/src/main/java/com/kwai/koom/javaoom/monitor/Threshold.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
又补充了2条,我没其他问题了 @alhah 再帮忙确认下
java-oom/src/main/java/com/kwai/koom/javaoom/monitor/HeapMonitor.java
Outdated
Show resolved
Hide resolved
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
作者好,感谢作者大大的开源。发现一个小小的改进点,我试着将内存提升到90%多了,这时候GC比较频繁的,heapStatus.used >= lastHeapStatus.used条件不成立会导致策略命中次数清0。
而此时的内存已经很危险了,稍有不慎就会OOM然后应用直接Crash掉了,后面就没法触发trigger了,目前的策略对于这种情况无法处理。
我建议应该增加一种策略,大于85%小于95%用原来的策略,大于95%强制触发trigger。姑且将这个95%叫做最大阀值。这样可以覆盖更多的可能性情况。