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

Thomas Mueller commented on OAK-6303:
-------------------------------------

Yes, the problem seems to be that this cache has many segments (16 by default). 
Each segment contains at least a few entries (4 in my test), so with 16 MB 
cache size (1 MB per segment with 16 segments), the heap space consumed can go 
to 64 MB. Possibly the cache size used can be higher than that right now (I 
don't have a test case yet).

It probably makes sense to reduce the number of segments to for example 4, as 
concurrency is not much of an issue in for this cache (there are not that many 
cache reads).

> Cache in CachingBlobStore might grow beyond configured limit
> ------------------------------------------------------------
>
>                 Key: OAK-6303
>                 URL: https://issues.apache.org/jira/browse/OAK-6303
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: blob, core
>            Reporter: Julian Reschke
>            Assignee: Thomas Mueller
>         Attachments: OAK-6303-test.diff
>
>
> It appears that depending on actual cache entry sizes, the {{CacheLIRS}} 
> might grow beyond the configured limit.
> For {{RDBBlobStore}}, the limit is currently configured to 16MB, yet storing 
> random 2M entries appears to fill the cache with 64MB of data (according to 
> it's own stats).
> The attached test case reproduces this.
> (it seems this is caused by the fact that each of the 16 segments of the 
> cache can hold 2 entries, no matter how big they are...)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to