[
https://issues.apache.org/jira/browse/OAK-6915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Francesco Mari updated OAK-6915:
--------------------------------
Attachment: OAK-6915-03.patch
The third revision of the patch is a compromise between the second version and
trunk. The Guava cache is more aggressively used like in the second version of
the patch, and the {{SegmentId#unloaded}} method is called for evicted cache
entries like in trunk.
There is a slight difference between this patch and trunk when it comes to
{{SegmentId#unloaded}}. The method affects only segments that are evicted from
the cache. If a segment is never stored in the cache, but its insertion is
rejected and it is evicted right away, {{SegmentId#unloaded}} will have no
effect.
Unit and integration tests pass. {{ManyChildNodesIT}} looks good with 2M nodes
and 512 MB RAM. {{StandbyTestIT#testSyncLoop}} shows the following statistics
when the diagnostics patch is applied.
{noformat}
TarMK data segment ID allocations: 38
TarMK bulk segment ID allocations: 2
TarMK uncached data segment reads: 33
TarMK uncached bulk segment reads: 2
TarMK written data segments......: 29
TarMK written bulk segments......: 2
{noformat}
> Minimize the amount of uncached segment reads
> ---------------------------------------------
>
> Key: OAK-6915
> URL: https://issues.apache.org/jira/browse/OAK-6915
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Reporter: Francesco Mari
> Assignee: Francesco Mari
> Fix For: 1.8, 1.7.12
>
> Attachments: OAK-6915-01.patch, OAK-6915-02.patch, OAK-6915-03.patch,
> OAK-6915-diagnostics-02.patch, OAK-6915-diagnostics.patch, OAK-6915.patch,
> Screen Shot 2017-11-09 at 14.14.28.png, Screen Shot 2017-11-09 at 14.16.59.png
>
>
> The current implementation of {{SegmentCache}} should make better use of the
> underlying Guava cache by relying on the cached segments instead of
> unconditionally performing an uncached segment read via the
> {{Callable<Segment>}} passed to {{SegmentCache#getSegment}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)