[
https://issues.apache.org/jira/browse/OAK-3904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Parvulescu updated OAK-3904:
---------------------------------
Attachment: tar-writer-trace.png
> 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: Bug
> Components: segmentmk
> Reporter: Alex Parvulescu
> Labels: compaction, gc
> 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 15% 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)