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 "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2016/06/23 14:57:16 UTC

[jira] [Updated] (OAK-3904) Compaction Map predicate should use cached state for evaluation

     [ https://issues.apache.org/jira/browse/OAK-3904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Parvulescu updated OAK-3904:
---------------------------------
    Fix Version/s: 1.2.17

> Compaction Map predicate should use cached state for evaluation
> ---------------------------------------------------------------
>
>                 Key: OAK-3904
>                 URL: https://issues.apache.org/jira/browse/OAK-3904
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segmentmk
>            Reporter: Alex Parvulescu
>            Assignee: Alex Parvulescu
>              Labels: compaction, gc
>             Fix For: 1.4, 1.3.15, 1.2.17
>
>         Attachments: tar-writer-trace.png
>
>
> In the case of offline compaction, the Compactor predicate would try to evaluate if a specific node is candidate for the map of not based on a set of conditions.
> To evaluate said conditions, the predicate currently uses the compacted state, the one that was just written by the SegmentWriter [0], but this offers very poor performance as this NodeState will be accessed from the TarWriter directly, a very IO intensive call (no memory mapping, no caching of the segment) [1].
> A much better thing is to use the cached nodestate, in my local test (on a SSD) this accounts for 10% of perf loss, I would imagine the gains are more significant on a non-SSD disk.
> [0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/Compactor.java#L252
> [1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarWriter.java#L190



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)