You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by th...@apache.org on 2013/10/02 12:12:16 UTC

svn commit: r1528408 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDocument.java

Author: thomasm
Date: Wed Oct  2 10:12:16 2013
New Revision: 1528408

URL: http://svn.apache.org/r1528408
Log:
OAK-926: MongoMK: split documents, but much earlier (to improve performance, and to better test the split mechanism)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDocument.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDocument.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDocument.java?rev=1528408&r1=1528407&r2=1528408&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDocument.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDocument.java Wed Oct  2 10:12:16 2013
@@ -65,18 +65,18 @@ public class NodeDocument extends Docume
      * A size threshold after which to consider a document a split candidate.
      * TODO: check which value is the best one
      */
-    static final int SPLIT_CANDIDATE_THRESHOLD = 32 * 1024;
+    static final int SPLIT_CANDIDATE_THRESHOLD = 8 * 1024;
 
     /**
      * A document size threshold after which a split is forced even if
      * {@link #REVISIONS_SPLIT_OFF_SIZE} is not reached.
      */
-    static final int FORCE_SPLIT_THRESHOLD = 1024 * 1024;
+    static final int FORCE_SPLIT_THRESHOLD = 16 * 1024;
 
     /**
      * Only split off at least this number of revisions.
      */
-    static final int REVISIONS_SPLIT_OFF_SIZE = 1000;
+    static final int REVISIONS_SPLIT_OFF_SIZE = 100;
 
     /**
      * Revision collision markers set by commits with modifications, which



RE: svn commit: r1528408 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDocument.java

Posted by Marcel Reutegger <mr...@adobe.com>.
Hi,

this quickly results in a root document, which is split very frequently.

the logs will show:

08.10.2013 18:05:21.142 *INFO* [MongoMK background thread] org.apache.jackrabbit.oak.plugins.mongomk.MongoMK Split operation on 0:/. Size before: 223382, after: 221378
08.10.2013 18:05:22.155 *INFO* [MongoMK background thread] org.apache.jackrabbit.oak.plugins.mongomk.MongoMK Split operation on 0:/. Size before: 223198, after: 221554
08.10.2013 18:05:23.174 *INFO* [MongoMK background thread] org.apache.jackrabbit.oak.plugins.mongomk.MongoMK Split operation on 0:/. Size before: 223442, after: 221730

I assume only few commits are split off to a new previous document,
which isn't worth the cost of adding a new reference to the main
document.

Regards
 Marcel

> -----Original Message-----
> From: thomasm@apache.org [mailto:thomasm@apache.org]
> Sent: Mittwoch, 2. Oktober 2013 12:12
> To: oak-commits@jackrabbit.apache.org
> Subject: svn commit: r1528408 - /jackrabbit/oak/trunk/oak-
> core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDoc
> ument.java
> 
> Author: thomasm
> Date: Wed Oct  2 10:12:16 2013
> New Revision: 1528408
> 
> URL: http://svn.apache.org/r1528408
> Log:
> OAK-926: MongoMK: split documents, but much earlier (to improve
> performance, and to better test the split mechanism)
> 
> Modified:
>     jackrabbit/oak/trunk/oak-
> core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDoc
> ument.java
> 
> Modified: jackrabbit/oak/trunk/oak-
> core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDoc
> ument.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-
> core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDoc
> ument.java?rev=1528408&r1=1528407&r2=1528408&view=diff
> ==========================================================
> ====================
> --- jackrabbit/oak/trunk/oak-
> core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDoc
> ument.java (original)
> +++ jackrabbit/oak/trunk/oak-
> core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/NodeDoc
> ument.java Wed Oct  2 10:12:16 2013
> @@ -65,18 +65,18 @@ public class NodeDocument extends Docume
>       * A size threshold after which to consider a document a split candidate.
>       * TODO: check which value is the best one
>       */
> -    static final int SPLIT_CANDIDATE_THRESHOLD = 32 * 1024;
> +    static final int SPLIT_CANDIDATE_THRESHOLD = 8 * 1024;
> 
>      /**
>       * A document size threshold after which a split is forced even if
>       * {@link #REVISIONS_SPLIT_OFF_SIZE} is not reached.
>       */
> -    static final int FORCE_SPLIT_THRESHOLD = 1024 * 1024;
> +    static final int FORCE_SPLIT_THRESHOLD = 16 * 1024;
> 
>      /**
>       * Only split off at least this number of revisions.
>       */
> -    static final int REVISIONS_SPLIT_OFF_SIZE = 1000;
> +    static final int REVISIONS_SPLIT_OFF_SIZE = 100;
> 
>      /**
>       * Revision collision markers set by commits with modifications, which
>