mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
because of a new database structure handling, the memory need for accessing
collection objects has been reduced to 50%: - set new memory calculation functions for indexing process - adjusted guessed memory amount -> Testing needed: try new recommended value (see performanceQueues) and see if OOMs occur. -> report maximum recommended value, so we can set new default values. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4053 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
9afd65bf82
commit
72752bb503
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user