[
https://issues.apache.org/jira/browse/OAK-5117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15670549#comment-15670549
]
Alex Parvulescu commented on OAK-5117:
--------------------------------------
bq. This means that, depending on the JVM, it will be checking any of the: PS
Eden Space, PS Survivor Space or PS Old Gen Space - whichever is found first.
are you _absolutely sure_ this is the case? the mentioned criteria also
includes checking {{isCollectionUsageThresholdSupported()}}
this is what I see when loading the jmx stats for {{PS Survivor Space}} and
{{PS Eden Space}}
{noformat}
javax.management.RuntimeMBeanException:
java.lang.UnsupportedOperationException: Usage threshold is not supported
{noformat}
bq. use getCollectionUsage() instead of getUsage() to check the state of the
heap after a GC. This way we avoid checking during temporary peaks of the used
heap.
this is a good find! I've initially written the code to set a notification on
{{getUsage()}}, and then we switched to {{getCollectionUsage()}}, this probably
got left behind.
> Improve checkMemory for compaction
> ----------------------------------
>
> Key: OAK-5117
> URL: https://issues.apache.org/jira/browse/OAK-5117
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Reporter: Valentin Olteanu
> Attachments: OAK-5117.patch
>
>
> The check introduced in OAK-4966 is relying on the first {{MemoryPoolMXBean}}
> found that matches the criteria. This means that, depending on the JVM, it
> will be checking any of the: PS Eden Space, PS Survivor Space or PS Old Gen
> Space - whichever is found first.
> I am proposing a more reliable way to check this:
> 1. check the biggest pool - this usually corresponds to PS Old Gen (by
> default 2/3 of the heap), which is more stable and reflects better the usage
> of the heap.
> 2. use {{getCollectionUsage()}} instead of {{getUsage()}} to check the state
> of the heap after a GC. This way we avoid checking during temporary peaks of
> the used heap.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)