directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1632902 - in /directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm: JdbmIndex.java JdbmPartition.java
Date Sun, 19 Oct 2014 12:34:06 GMT
Author: kayyagari
Date: Sun Oct 19 12:34:06 2014
New Revision: 1632902

URL: http://svn.apache.org/r1632902
Log:
o applying the same changes made to JdbmPartition as part of DIRSERVER-2002 to JdbmIndex
o changed the default cache level to 100, cause 2000 is also leading to OOM even when with
1GB heap size

Modified:
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=1632902&r1=1632901&r2=1632902&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
Sun Oct 19 12:34:06 2014
@@ -164,7 +164,15 @@ public class JdbmIndex<K> extends Abstra
         transactionManager.setMaximumTransactionsInLog( 2000 );
 
         // see DIRSERVER-2002
-        recMan = new CacheRecordManager( base, new MRU( 2000 ) );
+        // prevent the OOM when more than 50k users are loaded at a stretch
+        // adding this system property to make it configurable till JDBM gets replaced by
Mavibot
+        String cacheSizeVal = System.getProperty( "jdbm.recman.cache.size", "100" );
+        
+        int recCacheSize = Integer.parseInt( cacheSizeVal );
+        
+        LOG.info( "Setting CacheRecondManager's cache size to {}", recCacheSize );
+
+        recMan = new CacheRecordManager( base, new MRU( recCacheSize ) );
 
         try
         {

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=1632902&r1=1632901&r2=1632902&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
Sun Oct 19 12:34:06 2014
@@ -202,7 +202,7 @@ public class JdbmPartition extends Abstr
 
             // prevent the OOM when more than 50k users are loaded at a stretch
             // adding this system property to make it configurable till JDBM gets replaced
by Mavibot
-            String cacheSizeVal = System.getProperty( "jdbm.recman.cache.size", "2000" );
+            String cacheSizeVal = System.getProperty( "jdbm.recman.cache.size", "100" );
             
             int recCacheSize = Integer.parseInt( cacheSizeVal );
             



Mime
View raw message