You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Miroslav Smiljanic (Jira)" <ji...@apache.org> on 2020/10/02 17:00:00 UTC

[jira] [Comment Edited] (OAK-9250) 3rd level segment cache: perform direct memory allocation based on the value of the system property

    [ https://issues.apache.org/jira/browse/OAK-9250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17206330#comment-17206330 ] 

Miroslav Smiljanic edited comment on OAK-9250 at 10/2/20, 4:59 PM:
-------------------------------------------------------------------

I believe OOME happens because test holds references of all segment buffers, so they are never GCed. 

Test is instantiating 1000 segments, writing them, and then reading them all but in different [hash map|https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.34.0/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/AbstractPersistentCacheTest.java#L71-L72] (so retains references).

I did debugging, and OOME eventually happens at this line

[https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.34.0/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/AbstractPersistentCacheTest.java]

In the new patch I increased memory for surefire plugin, and now tests are passing.
 [^OAK-9250_increase_memory_for_tests.patch] 



was (Author: smiroslav):
I believe OOME happens because test holds references of all segment buffers, so they are never GCed. 

Test is instantiating 1000 segments, writing them, and then reading them all but in different [hash map|https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.34.0/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/AbstractPersistentCacheTest.java#L71-L72] (so retains references).

I did debugging, and OOME eventually happens at this line

[https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.34.0/oak-segment-remote/src/test/java/org/apache/jackrabbit/oak/segment/remote/persistentcache/AbstractPersistentCacheTest.java]

I the new patch I increased memory for surefire plugin, and now tests are passing.
 [^OAK-9250_increase_memory_for_tests.patch] 


> 3rd level segment cache: perform direct memory allocation based on the value of the system property
> ---------------------------------------------------------------------------------------------------
>
>                 Key: OAK-9250
>                 URL: https://issues.apache.org/jira/browse/OAK-9250
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Miroslav Smiljanic
>            Assignee: Andrei Dulceanu
>            Priority: Major
>         Attachments: OAK-9250.patch, OAK-9250_increase_memory_for_tests.patch
>
>
> Currently redis and disk cache are doing direct memory allocation when reading segments. It should be done based on the value of the system property. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)