jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: MongoMK^2 design proposal
Date Thu, 14 Feb 2013 01:16:39 GMT
Hi,

On Tue, Jan 29, 2013 at 12:48 PM, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> On Tue, Jan 29, 2013 at 12:01 PM, Marcel Reutegger <mreutegg@adobe.com> wrote:
>>> Template records
>>
>> I'm a bit skeptical if the added complexity is worth the disk space saving.
>
> I thought so too, but simple benchmarks show that the size savings are
> significant (20-50%) especially for small, frequently accessed nodes
> like ACL entries or CQ paragraphs that would ideally be kept as close
> as possible to the containing parent node.

See the latest SegmentSizeTest for some added insight on this.

One of the tests measures the storage size of a simple ACL with four
ACEs, based on content in CQ5. Without templates (and sharing of
strings across nodes) storing such an ACL takes about the same space,
600+ bytes, as the equivalent JSON representation shown below. With
the template feature the amortized size of such an ACL is just about
150 bytes, with still some room for further optimization.

In practice that means that with templates the memory cost of caching
the entire ACL is about the same as the cost of caching just one of
the ACEs without templates.

BR,

Jukka Zitting

----

{ "jcr:primaryType": "rep:ACL",
  "deny": {
    "jcr:primaryType":   "rep:DenyACE",
    "rep:principalName": "everyone",
    "rep:privileges":    [ "jcr:read" ]
  },
  "allow": {
    "jcr:primaryType":   "rep:GrantACE",
    "rep:principalName": "administrators",
    "rep:privileges":    [ "jcr:all" ]
  },
  "deny0": {
    "jcr:primaryType":   "rep:DenyACE",
    "rep:principalName": "everyone",
    "rep:glob":          "*/activities/*",
    "rep:privileges":    [ "jcr:read" ]
  },
  "allow0": {
    "jcr:primaryType":   "rep:GrantACE",
    "rep:principalName": "user-administrators",
    "rep:privileges":    [ "jcr:all" ]
  }
}

Mime
View raw message