Repository: diennea/herddb
Pull request #757 (2021-08-27 14:37:10)

Improve memory configuration #755
This patch solves #755:

- add a new set of configuration to be able to configure memory constraints based on a percentage of maximum memory and not an absolute number: server.memory.data.percentage, server.memory.index.percentage server.memory.pk.percentage. Actually data and pk are simply a configurable value for a previous fixed one. The index is new, see below
- add a new set of configuration to enable indexes / data pages memory separation. Up untill now data and indexes was stored in the same memory space with the same constraint. Now you can configure server.memory.index.percentage (maximum memory percentage value, defaults to 0%) or server.memory.index.limit (byte fixed value, default to 0). If dedicated index memory resolves to a value more than 0 it will be used instead of data memory. By default index will continue to share data memory
- Due to memory inspections I noted that memory occupancy is evaluated enough well, we don't need to keep up to 50% memory free by default for "every else". Increased data default space from 30% to 50%.

 - [ x ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)



Patch:
diff --git a/herddb-core/src/main/java/herddb/core/DBManager.java b/herddb-core/src/main/java/herddb/core/DBManager.java
index b9630554..6d801a9c 100644
--- a/herddb-core/src/main/java/herddb/core/DBManager.java
+++ b/herddb-core/src/main/java/herddb/core/DBManager.java
@@ -154,7 +154,11 @@ public class DBManager implements AutoCloseable, MetadataChangeListener {
     private long maxMemoryReference = ServerConfiguration.PROPERTY_MEMORY_LIMIT_REFERENCE_DEFAULT;
     private long maxLogicalPageSize = ServerConfiguration.PROPERTY_MAX_LOGICAL_PAGE_SIZE_DEFAULT;
     private long maxDataUsedMemory = ServerConfiguration.PROPERTY_MAX_DATA_MEMORY_DEFAULT;
+    private long maxIndexUsedMemory = ServerConfiguration.PROPERTY_MAX_INDEX_MEMORY_DEFAULT;
     private long maxPKUsedMemory = ServerConfiguration.PROPERTY_MAX_PK_MEMORY_DEFAULT;
+    private double maxDataUsedMemoryPercentage = ServerConfiguration.PROPERTY_MAX_DATA_MEMORY_PERCENTAGE_DEFAULT;
+    private double maxIndexUsedMemoryPercentage = ServerConfiguration.PROPERTY_MAX_INDEX_MEMORY_PERCENTAGE_DEFAULT;
+    private double maxPKUsedMemoryPercentage = ServerConfiguration.PROPERTY_MAX_PK_MEMORY_PERCENTAGE_DEFAULT;
 
     private boolean clearAtBoot = false;
     private boolean haltOnTableSpaceBootError = ServerConfiguration.PROPERTY_HALT_ON_TABLESPACE_BOOT_ERROR_DEAULT;
@@ -257,10 +261,38 @@ public class DBManager implements AutoCloseable, MetadataChangeListener {
                 ServerConfiguration.PROPERTY_MAX_DATA_MEMORY,
                 ServerConfiguration.PROPERTY_MAX_DATA_MEMORY_DEFAULT);
 
+        this.maxIndexUsedMemory = configuration.getLong(
+                ServerConfiguration.PROPERTY_MAX_INDEX_MEMORY,
+                ServerConfiguration.PROPERTY_MAX_INDEX_MEMORY_DEFAULT);
+
         this.maxPKUsedMemory = configuration.getLong(
                 ServerConfiguration.PROPERTY_MAX_PK_MEMORY,
                 ServerConfiguration.PROPERTY_MAX_PK_MEMORY_DEFAULT);
 
+        this.maxDataUsedMemoryPercentage = configuration.getDouble(
+                ServerConfiguration.PROPERTY_MAX_DATA_MEMORY_PERCENTAGE,
+                ServerConfiguration.PROPERTY_MAX_DATA_MEMORY_PERCENTAGE_DEFAULT);
+
+        if (maxDataUsedMemoryPercentage <= 0.0D) {
+            maxDataUsedMemoryPercentage = ServerConfiguration.PROPERTY_MAX_DATA_MEMORY_PERCENTAGE_DEFAULT;
+        }
+
+        this.maxIndexUsedMemoryPercentage = configuration.getDouble(
+                ServerConfiguration.PROPERTY_MAX_INDEX_MEMORY_PERCENTAGE,
+                ServerConfiguration.PROPERTY_MAX_INDEX_MEMORY_PERCENTAGE_DEFAULT);
+
+        if (maxIndexUsedMemoryPercentage <= 0.0D) {
+            maxIndexUsedMemoryPercentage = ServerConfiguration.PROPERTY_MAX_DATA_MEMORY_PERCENTAGE_DEFAULT;
+        }
+
+        this.maxPKUsedMemoryPercentage = configuration.getDouble(
+                ServerConfiguration.PROPERTY_MAX_PK_MEMORY_PERCENTAGE,
+                ServerConfiguration.PROPERTY_MAX_PK_MEMORY_PERCENTAGE_DEFAULT);
+
+        if (maxPKUsedMemoryPercentage <= 0.0D) {
+            maxPKUsedMemoryPercentage = ServerConfiguration.PROPERTY_MAX_PK_MEMORY_PERCENTAGE_DEFAULT;
+        }
+
     }
 
     public boolean isHaltOnTableSpaceBootError() {
@@ -355,6 +387,14 @@ public class DBManager implements AutoCloseable, MetadataChangeListener {
         this.maxDataUsedMemory = maxDataUsedMemory;
     }
 
+    public long getMaxIndexUsedMemory() {
+        return maxIndexUsedMemory;
+    }
+
+    public void setMaxIndexUsedMemory(long maxIndexUsedMemory) {
+        this.maxIndexUsedMemory = maxIndexUsedMemory;
+    }
+
     public long getMaxPKUsedMemory() {
         return maxPKUsedMemory;
     }
@@ -403,29 +443,39 @@ public class DBManager implements AutoCloseable, MetadataChangeListener {
         }
         LOGGER.log(Level.INFO, ServerConfiguration.PROPERTY_MEMORY_LIMIT_REFERENCE + "= {0} bytes", Long.toString(maxMemoryReference));
 
-        /* If max data memory for pages isn't configured or is too high default it to 0.3 maxMemoryReference */
+        /* If max data memory for pages isn't configured or is too high default it to a maxMemoryReference percentage */
         if (maxDataUsedMemory == 0 || maxDataUsedMemory > maxMemoryReference) {
-            maxDataUsedMemory = (long) (0.3F * maxMemoryReference);
+            maxDataUsedMemory = (long) (maxDataUsedMemoryPercentage * maxMemoryReference);
         }
 
-        /* If max index memory for pages isn't configured or is too high default it to 0.2 maxMemoryReference */
+        /* If max index memory for pages isn't configured or is too high default it to a maxMemoryReference percentage */
+        if (maxIndexUsedMemory == 0 || maxIndexUsedMemory > maxMemoryReference) {
+            maxIndexUsedMemory = (long) (maxIndexUsedMemoryPercentage * maxMemoryReference);
+        }
+
+        /* If max index memory for pages isn't configured or is too high default it to a maxMemoryReference percentage */
         if (maxPKUsedMemory == 0 || maxPKUsedMemory > maxMemoryReference) {
-            maxPKUsedMemory = (long) (0.2F * maxMemoryReference);
+            maxPKUsedMemory = (long) (maxPKUsedMemoryPercentage * maxMemoryReference);
         }
 
         /* If max used memory is too high lower index and data accordingly */
-        if (maxDataUsedMemory + maxPKUsedMemory > maxMemoryReference) {
+        if (maxDataUsedMemory + maxIndexUsedMemory + maxPKUsedMemory > maxMemoryReference) {
 
             long data = (int) ((double) maxDataUsedMemory
-                    / ((double) (maxDataUsedMemory + maxPKUsedMemory)) * maxMemoryReference);
+                    / ((double) (maxDataUsedMemory + maxIndexUsedMemory + maxPKUsedMemory)) * maxMemoryReference);
+
+            long index = (int) ((double) maxIndexUsedMemory
+                    / ((double) (maxDataUsedMemory + maxIndexUsedMemory + maxPKUsedMemory)) * maxMemoryReference);
+
             long pk = (int) ((double) maxPKUsedMemory
-                    / ((double) (maxDataUsedMemory + maxPKUsedMemory)) * maxMemoryReference);
+                    / ((double) (maxDataUsedMemory + maxIndexUsedMemory + maxPKUsedMemory)) * maxMemoryReference);
 
             maxDataUsedMemory = data;
+            maxIndexUsedMemory = data;
             maxPKUsedMemory = pk;
         }
 
-        memoryManager = new MemoryManager(maxDataUsedMemory, maxPKUsedMemory, maxLogicalPageSize);
+        memoryManager = new MemoryManager(maxDataUsedMemory, maxIndexUsedMemory, maxPKUsedMemory, maxLogicalPageSize);
 
         metadataStorageManager.start();
 
diff --git a/herddb-core/src/main/java/herddb/core/MemoryManager.java b/herddb-core/src/main/java/herddb/core/MemoryManager.java
index c8e59bf5..efd9da2b 100644
--- a/herddb-core/src/main/java/herddb/core/MemoryManager.java
+++ b/herddb-core/src/main/java/herddb/core/MemoryManager.java
@@ -38,15 +38,18 @@ public class MemoryManager {
             MemoryManager.class.getName() + ".pageReplacementPolicy", "cp").toLowerCase(Locale.US);
 
     private final long maxDataUsedMemory;
+    private final long maxIndexUsedMemory;
     private final long maxPKUsedMemory;
     private final long maxLogicalPageSize;
 
     private final PageReplacementPolicy dataPageReplacementPolicy;
+    private final PageReplacementPolicy indexPageReplacementPolicy;
     private final PageReplacementPolicy pkPageReplacementPolicy;
 
-    public MemoryManager(long maxDataUsedMemory, long maxPKUsedMemory, long maxLogicalPageSize) {
+    public MemoryManager(long maxDataUsedMemory, long maxIndexUsedMemory, long maxPKUsedMemory, long maxLogicalPageSize) {
 
         this.maxDataUsedMemory = maxDataUsedMemory;
+        this.maxIndexUsedMemory = maxIndexUsedMemory;
         this.maxPKUsedMemory = maxPKUsedMemory;
         this.maxLogicalPageSize = maxLogicalPageSize;
 
@@ -55,33 +58,51 @@ public class MemoryManager {
                     + ") must be greater or equal than page size (" + maxLogicalPageSize + ")");
         }
 
+        // Max index memory 0 is acceptable, will use data memory instead
+        if (maxIndexUsedMemory > 0 && maxIndexUsedMemory < maxLogicalPageSize) {
+            throw new IllegalArgumentException("Max memory for index pages (" + maxIndexUsedMemory
+                    + ") must be greater or equal than page size (" + maxLogicalPageSize + ")");
+        }
+
         if (maxPKUsedMemory < maxLogicalPageSize) {
             throw new IllegalArgumentException("Max memory for primary key index pages (" + maxPKUsedMemory
                     + ") must be greater or equal than page size (" + maxLogicalPageSize + ")");
         }
 
         final int dataPages = (int) (maxDataUsedMemory / maxLogicalPageSize);
+        final int indexPages = (int) (maxIndexUsedMemory / maxLogicalPageSize);
         final int pkPages = (int) (maxPKUsedMemory / maxLogicalPageSize);
 
-        LOGGER.log(Level.INFO, "Maximum amount of memory for data and indexes {0}", (maxDataUsedMemory / (1024 * 1024)) + " MB");
-        LOGGER.log(Level.INFO, "Maximum amount of memory for primary key indexes {0}", (maxPKUsedMemory / (1024 * 1024)) + " MB");
+        LOGGER.log(Level.INFO, "Maximum amount of memory for primary key indexes {0} ({1} pages)",
+                new Object[]{(maxPKUsedMemory / (1024 * 1024)) + " MB", pkPages});
+
+        if (indexPages > 0) {
+            LOGGER.log(Level.INFO, "Maximum amount of memory for data {0} ({1} pages)",
+                    new Object[]{(maxDataUsedMemory / (1024 * 1024)) + " MB", dataPages});
+            LOGGER.log(Level.INFO, "Maximum amount of memory for indexes {0} ({1} pages)",
+                    new Object[]{(maxIndexUsedMemory / (1024 * 1024)) + " MB", indexPages});
+        } else {
+            LOGGER.log(Level.INFO, "Maximum amount of memory for data and indexes {0} ({1} pages)",
+                    new Object[]{(maxDataUsedMemory / (1024 * 1024)) + " MB", dataPages});
+        }
 
-        LOGGER.log(Level.INFO, "Maximum number of loaded pages for data {0}"
-                + ", maximum number of loadedd pages for primary key indexes {1}", new Object[]{dataPages, pkPages});
         switch (PAGE_REPLACEMENT_POLICY) {
             case "random":
                 dataPageReplacementPolicy = new RandomPageReplacementPolicy(dataPages);
+                indexPageReplacementPolicy = indexPages > 0 ? new RandomPageReplacementPolicy(dataPages) : dataPageReplacementPolicy;
                 pkPageReplacementPolicy = new RandomPageReplacementPolicy(pkPages);
                 break;
 
             case "cp":
                 dataPageReplacementPolicy = new ClockProPolicy(dataPages);
+                indexPageReplacementPolicy = indexPages > 0 ? new ClockProPolicy(dataPages) : dataPageReplacementPolicy;
                 pkPageReplacementPolicy = new ClockProPolicy(pkPages);
                 break;
 
             case "car":
             default:
                 dataPageReplacementPolicy = new ClockAdaptiveReplacement(dataPages);
+                indexPageReplacementPolicy = indexPages > 0 ? new ClockAdaptiveReplacement(dataPages) : dataPageReplacementPolicy;
                 pkPageReplacementPolicy = new ClockAdaptiveReplacement(pkPages);
         }
 
@@ -92,6 +113,10 @@ public class MemoryManager {
     }
 
     public long getMaxIndexUsedMemory() {
+        return maxIndexUsedMemory;
+    }
+
+    public long getMaxPKUsedMemory() {
         return maxPKUsedMemory;
     }
 
@@ -103,6 +128,10 @@ public class MemoryManager {
         return dataPageReplacementPolicy;
     }
 
+    public PageReplacementPolicy getIndexPageReplacementPolicy() {
+        return indexPageReplacementPolicy;
+    }
+
     public PageReplacementPolicy getPKPageReplacementPolicy() {
         return pkPageReplacementPolicy;
     }
diff --git a/herddb-core/src/main/java/herddb/index/brin/BRINIndexManager.java b/herddb-core/src/main/java/herddb/index/brin/BRINIndexManager.java
index c216b341..229dff33 100644
--- a/herddb-core/src/main/java/herddb/index/brin/BRINIndexManager.java
+++ b/herddb-core/src/main/java/herddb/index/brin/BRINIndexManager.java
@@ -88,7 +88,7 @@ public class BRINIndexManager extends AbstractIndexManager {
                                              writeLockTimeout, readLockTimeout);
         this.data = new BlockRangeIndex<>(
                 memoryManager.getMaxLogicalPageSize(),
-                memoryManager.getDataPageReplacementPolicy(),
+                memoryManager.getIndexPageReplacementPolicy(),
                 storageLayer);
     }
 
diff --git a/herddb-core/src/main/java/herddb/server/ServerConfiguration.java b/herddb-core/src/main/java/herddb/server/ServerConfiguration.java
index 27920870..2ad8532b 100644
--- a/herddb-core/src/main/java/herddb/server/ServerConfiguration.java
+++ b/herddb-core/src/main/java/herddb/server/ServerConfiguration.java
@@ -280,12 +280,38 @@ public final class ServerConfiguration {
     public static final String PROPERTY_MAX_DATA_MEMORY = "server.memory.data.limit";
     public static final long PROPERTY_MAX_DATA_MEMORY_DEFAULT = 0L;
 
+    /**
+     * Maximum amount of memory used for data pages
+     */
+    public static final String PROPERTY_MAX_INDEX_MEMORY = "server.memory.index.limit";
+    public static final long PROPERTY_MAX_INDEX_MEMORY_DEFAULT = 0L;
+
     /**
      * Maximum amount of memory used for primary index pages
      */
     public static final String PROPERTY_MAX_PK_MEMORY = "server.memory.pk.limit";
     public static final long PROPERTY_MAX_PK_MEMORY_DEFAULT = 0L;
 
+    /**
+     * Percentage of maximum memory used for data pages, will be used if {@link PROPERTY_MAX_DATA_MEMORY} is not given
+     */
+    public static final String PROPERTY_MAX_DATA_MEMORY_PERCENTAGE = "server.memory.data.percentage";
+    public static final double PROPERTY_MAX_DATA_MEMORY_PERCENTAGE_DEFAULT = 0.50D;
+
+    /**
+     * Percentage of maximum memory used for index pages, will be used if {@link PROPERTY_MAX_INDEX_MEMORY} is not given.
+     * A value of zero means "no dedicated index memory": data memory will be used instead.
+     */
+    public static final String PROPERTY_MAX_INDEX_MEMORY_PERCENTAGE = "server.memory.index.percentage";
+    public static final double PROPERTY_MAX_INDEX_MEMORY_PERCENTAGE_DEFAULT = 0.00D;
+
+    /**
+     * Percentage of maximum memory used for primary index pages, will be used if {@link PROPERTY_MAX_PK_MEMORY} is
+     * not given
+     */
+    public static final String PROPERTY_MAX_PK_MEMORY_PERCENTAGE = "server.memory.pk.percentage";
+    public static final double PROPERTY_MAX_PK_MEMORY_PERCENTAGE_DEFAULT = 0.20D;
+
     public static final String PROPERTY_JMX_ENABLE = "server.jmx.enable";
     public static final boolean PROPERTY_JMX_ENABLE_DEFAULT = true;
 
diff --git a/herddb-services/src/main/resources/conf/server.properties b/herddb-services/src/main/resources/conf/server.properties
index fcf281e1..91e95eaa 100644
--- a/herddb-services/src/main/resources/conf/server.properties
+++ b/herddb-services/src/main/resources/conf/server.properties
@@ -177,12 +177,26 @@ server.users.file=../conf/users
 # overall limit on memory usage. it defaults to maximum heap size configured on the JVM
 #server.memory.max.limit=
 
-# maximum amount of memory (in bytes) used for data. Defaults to 30% of server.memory.max.limit
+# Maximum amount of memory (in bytes) used for data. Defaults to 50% of server.memory.max.limit
 #server.memory.data.limit=
 
-# maximum amount of memory (in bytes) used for primary indexes. Defaults to 20% of server.memory.max.limit
+# Maximum amount of memory (in bytes) used for indexes. Defaults to 0% of server.memory.max.limit.
+# If no memory for indexes is configured between server.memory.index.limit and server.memory.index.percentage
+# indexes will not use dedicated memory but will share data memory (default behaviour)
+#server.memory.index.limit=
+
+# Maximum amount of memory (in bytes) used for primary indexes. Defaults to 20% of server.memory.max.limit
 #server.memory.pk.limit=
 
+# Percentage of maximum memory used for data, defaults to 50%. Used only if server.memory.data.limit isn't configured
+#server.memory.data.percentage=
+
+# Percentage of maximum memory used for indexes, defaults to 0%. Used only if server.memory.index.limit isn't configured
+#server.memory.index.percentage=
+
+# Percentage of maximum memory used for primary indexes, defaults to 20%. Used only if server.memory.pk.limit isn't configured
+#server.memory.pk.percentage=
+
 # enable/disable JMX
 #server.jmx.enable=true
 


Test patch:
diff --git a/herddb-core/src/test/java/herddb/cluster/follower/ChangeRoleTest.java b/herddb-core/src/test/java/herddb/cluster/follower/ChangeRoleTest.java
index fd207318..24b1d939 100644
--- a/herddb-core/src/test/java/herddb/cluster/follower/ChangeRoleTest.java
+++ b/herddb-core/src/test/java/herddb/cluster/follower/ChangeRoleTest.java
@@ -103,11 +103,13 @@ public class ChangeRoleTest extends MultiServerBase {
                     new HashSet<>(Arrays.asList("server1", "server2")), "server1", 1, 0), StatementEvaluationContext.DEFAULT_EVALUATION_CONTEXT(), TransactionContext.NO_TRANSACTION);
 
             assertEquals(0, server2MemoryManager.getDataPageReplacementPolicy().size());
+            assertEquals(0, server2MemoryManager.getIndexPageReplacementPolicy().size());
             assertEquals(0, server2MemoryManager.getPKPageReplacementPolicy().size());
 
             server_2.waitForTableSpaceBoot(TableSpace.DEFAULT, false);
 
-            assertEquals(2, server2MemoryManager.getDataPageReplacementPolicy().size());
+            assertEquals(1, server2MemoryManager.getDataPageReplacementPolicy().size());
+            assertEquals(1, server2MemoryManager.getIndexPageReplacementPolicy().size());
             assertEquals(1, server2MemoryManager.getPKPageReplacementPolicy().size());
 
             // stop tablespace on server2
@@ -125,6 +127,7 @@ public class ChangeRoleTest extends MultiServerBase {
 
             // memory must have been totally released
             assertEquals(0, server2MemoryManager.getDataPageReplacementPolicy().size());
+            assertEquals(0, server2MemoryManager.getIndexPageReplacementPolicy().size());
             assertEquals(0, server2MemoryManager.getPKPageReplacementPolicy().size());
 
             // start tablespace on server2, as let it become leader
@@ -135,6 +138,7 @@ public class ChangeRoleTest extends MultiServerBase {
 
             assertTrue("unexpected value " + server2MemoryManager.getDataPageReplacementPolicy().size(),
                     server2MemoryManager.getDataPageReplacementPolicy().size() >= 1);
+            assertEquals(1, server2MemoryManager.getIndexPageReplacementPolicy().size());
             assertEquals(1, server2MemoryManager.getPKPageReplacementPolicy().size());
 
             server_1.getManager().executeStatement(new AlterTableSpaceStatement(TableSpace.DEFAULT,
@@ -149,6 +153,7 @@ public class ChangeRoleTest extends MultiServerBase {
 
             // memory must have been totally released again
             assertEquals(0, server2MemoryManager.getDataPageReplacementPolicy().size());
+            assertEquals(0, server2MemoryManager.getIndexPageReplacementPolicy().size());
             assertEquals(0, server2MemoryManager.getPKPageReplacementPolicy().size());
 
         }
diff --git a/herddb-core/src/test/java/herddb/index/BLinkKeyToPageIndexTest.java b/herddb-core/src/test/java/herddb/index/BLinkKeyToPageIndexTest.java
index 821214d6..bea7d2e6 100644
--- a/herddb-core/src/test/java/herddb/index/BLinkKeyToPageIndexTest.java
+++ b/herddb-core/src/test/java/herddb/index/BLinkKeyToPageIndexTest.java
@@ -45,7 +45,7 @@ public class BLinkKeyToPageIndexTest extends KeyToPageIndexTest {
     @Override
     KeyToPageIndex createIndex() {
 
-        MemoryManager mem = new MemoryManager(5 * (1L << 20), 10 * (128L << 10), (128L << 10));
+        MemoryManager mem = new MemoryManager(5 * (1L << 20), 0, 10 * (128L << 10), (128L << 10));
         MemoryDataStorageManager ds = new MemoryDataStorageManager();
         BLinkKeyToPageIndex idx = new BLinkKeyToPageIndex("tblspc", "tbl", mem, ds);
 
diff --git a/herddb-core/src/test/java/herddb/index/blink/BlinkBench.java b/herddb-core/src/test/java/herddb/index/blink/BlinkBench.java
index 560818e4..6fc8026b 100644
--- a/herddb-core/src/test/java/herddb/index/blink/BlinkBench.java
+++ b/herddb-core/src/test/java/herddb/index/blink/BlinkBench.java
@@ -122,7 +122,7 @@ public class BlinkBench {
                 PrintStream eps = new PrintStream(eos);
                 System.setErr(eps);
 
-                MemoryManager mem = new MemoryManager(5 * (1L << 20), 10 * (128L << 10), (128L << 10));
+                MemoryManager mem = new MemoryManager(5 * (1L << 20), 10 * (128L << 10), 0, (128L << 10));
 
                 try (MemoryDataStorageManager ds = new MemoryDataStorageManager();
                      BLinkKeyToPageIndex idx = new BLinkKeyToPageIndex("tblspc", "tbl", mem, ds)) {
diff --git a/herddb-core/src/test/java/herddb/index/blink/BlinkRandomBench.java b/herddb-core/src/test/java/herddb/index/blink/BlinkRandomBench.java
index afe0e51a..7f23beb3 100644
--- a/herddb-core/src/test/java/herddb/index/blink/BlinkRandomBench.java
+++ b/herddb-core/src/test/java/herddb/index/blink/BlinkRandomBench.java
@@ -122,7 +122,7 @@ public class BlinkRandomBench {
                 PrintStream eps = new PrintStream(eos);
                 System.setErr(eps);
 
-                MemoryManager mem = new MemoryManager(5 * (1L << 20), 10 * (128L << 10), (128L << 10));
+                MemoryManager mem = new MemoryManager(5 * (1L << 20), 10 * (128L << 10), 0, (128L << 10));
                 // MemoryManager mem = new MemoryManager(5 * (1L << 20), (128L << 10), (128L << 10));
 
                 try (MemoryDataStorageManager ds = new MemoryDataStorageManager();