diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.java index 0943eff06..60a883bbe 100644 --- a/htroot/PerformanceQueues_p.java +++ b/htroot/PerformanceQueues_p.java @@ -176,7 +176,7 @@ public class PerformanceQueues_p { // disallow setting of memprereq for indexer to prevent db from throwing OOMs prop.put("table_" + c + "_disabled", /*(threadName.endsWith("_indexing")) ? 1 :*/ 0); prop.put("table_" + c + "_recommendation", (threadName.endsWith("_indexing")) ? 1 : 0); - prop.put("table_" + c + "_recommendation_value", (threadName.endsWith("_indexing")) ? ((switchboard.wordIndex.minMem() + 2 * 1024 * 1024)/1024) : 0); + prop.put("table_" + c + "_recommendation_value", (threadName.endsWith("_indexing")) ? (switchboard.wordIndex.minMem() / 1024) : 0); c++; } prop.put("table", c); diff --git a/source/de/anomic/index/indexCollectionRI.java b/source/de/anomic/index/indexCollectionRI.java index ed83e4b39..c52c8aa35 100644 --- a/source/de/anomic/index/indexCollectionRI.java +++ b/source/de/anomic/index/indexCollectionRI.java @@ -82,7 +82,7 @@ public class indexCollectionRI implements indexRI { public int minMem() { // calculate a minimum amount of memory that is necessary to use the index // during runtime (after the object was initialized) - return collectionIndex.minMem(); + return 100 * 1024 /* overhead here */ + collectionIndex.minMem(); } public synchronized kelondroCloneableIterator wordContainers(String startWordHash, boolean rot) { diff --git a/source/de/anomic/index/indexRAMRI.java b/source/de/anomic/index/indexRAMRI.java index 11d289ecd..d5005b696 100644 --- a/source/de/anomic/index/indexRAMRI.java +++ b/source/de/anomic/index/indexRAMRI.java @@ -95,7 +95,9 @@ public final class indexRAMRI implements indexRI { } public int minMem() { - return 1024*1024; + // there is no specific large array that needs to be maintained + // this value is just a guess of the possible overhead + return 100 * 1024; // 100 kb } public synchronized long getUpdateTime(String wordHash) { diff --git a/source/de/anomic/kelondro/kelondroCollectionIndex.java b/source/de/anomic/kelondro/kelondroCollectionIndex.java index 6a2a7598e..06d18b4ec 100644 --- a/source/de/anomic/kelondro/kelondroCollectionIndex.java +++ b/source/de/anomic/kelondro/kelondroCollectionIndex.java @@ -276,7 +276,7 @@ public class kelondroCollectionIndex { // this is computed by the size of the biggest used collection // this must be multiplied with the payload size // and doubled for necessary memory transformation during sort operation - return (int) (2 * arrayCapacity(arrays.size() - 1) * this.payloadrow.objectsize * kelondroRowSet.growfactor); + return (int) (arrayCapacity(arrays.size() - 1) * this.payloadrow.objectsize * kelondroRowSet.growfactor); } private void array_remove( diff --git a/source/de/anomic/plasma/plasmaWordIndex.java b/source/de/anomic/plasma/plasmaWordIndex.java index d80ae0ecc..233b35e55 100644 --- a/source/de/anomic/plasma/plasmaWordIndex.java +++ b/source/de/anomic/plasma/plasmaWordIndex.java @@ -91,7 +91,7 @@ public final class plasmaWordIndex implements indexRI { } public int minMem() { - return 2*1024*1024 /* indexing overhead */ + dhtOutCache.minMem() + dhtInCache.minMem() + collections.minMem(); + return 1024*1024 /* indexing overhead */ + dhtOutCache.minMem() + dhtInCache.minMem() + collections.minMem(); } public int maxURLinDHTOutCache() {