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

Jukka Zitting resolved OAK-1032.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.11
         Assignee: Jukka Zitting

There is now only one SegmentWriter.

> SegmentMK: One SegmentWriter per SegmentNodeStore
> -------------------------------------------------
>
>                 Key: OAK-1032
>                 URL: https://issues.apache.org/jira/browse/OAK-1032
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: core
>            Reporter: Jukka Zitting
>            Assignee: Jukka Zitting
>            Priority: Minor
>             Fix For: 0.11
>
>
> Currently each SegmentNodeStoreBranch (and thus Root) instance has it's own 
> SegmentWriter that it uses to construct new segments. This allows maximum 
> write concurrency as there's no need for any synchronization at the 
> SegmentWriter level.
> The downside of this solution is that the resulting segments are often very 
> small (< 100 bytes), which increases write overhead (in TarMK each segment 
> needs at least 1kB of disk space) and reduces locality of reference (related 
> content gets scattered across many segments). And concurrent write throughput 
> is in any case constrained when more than one writer is updating the same 
> journal.
> Thus I think it would be good to instead have just one SegmentWriter per 
> SegmentNodeStore and have all branches use that shared writer. This requires 
> synchronization when writing individual records, and can thus lead to extra 
> contention, but since records are fine-grained and all record writes happen 
> in memory, the amount of contention should be fairly small for normal 
> workloads (and for truly heavy concurrent writing, we'd in any case be using 
> multiple processes across many cluster nodes, in which case this limit 
> wouldn't apply).



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to