From 06b8185b5f75224cee3588ea774725e8afe7520b Mon Sep 17 00:00:00 2001
From: Yannick Lecaillez <yannick.lecaillez@forgerock.com>
Date: Fri, 26 Feb 2016 16:20:01 +0000
Subject: [PATCH] OPENDJ-2721: JE is using all the available heap memory during import.
---
opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/JEStorage.java | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/JEStorage.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/JEStorage.java
index da29be0..b4ec55b 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/JEStorage.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/JEStorage.java
@@ -11,7 +11,7 @@
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions Copyright [year] [name of copyright owner]".
*
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015-2016 ForgeRock AS.
*/
package org.opends.server.backends.jeb;
@@ -589,6 +589,8 @@
return accessMode.isWriteable() ? writeableStorage : new ReadOnlyTransactionImpl(writeableStorage);
}
+ private static final int IMPORT_DB_CACHE_SIZE = 32 * MB;
+
private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
/** Use read committed isolation instead of the default which is repeatable read. */
@@ -655,6 +657,7 @@
.setAllowCreate(true)
.setLockTimeout(0, TimeUnit.SECONDS)
.setTxnTimeout(0, TimeUnit.SECONDS)
+ .setCacheSize(IMPORT_DB_CACHE_SIZE)
.setDurability(Durability.COMMIT_NO_SYNC)
.setConfigParam(CLEANER_MIN_UTILIZATION, String.valueOf(config.getDBCleanerMinUtilization()))
.setConfigParam(LOG_FILE_MAX, String.valueOf(config.getDBLogFileMax()));
--
Gitblit v1.10.0