diff --git a/htroot/PerformanceMemory_p.html b/htroot/PerformanceMemory_p.html
index 78ddae6cd..70f0282af 100644
--- a/htroot/PerformanceMemory_p.html
+++ b/htroot/PerformanceMemory_p.html
@@ -91,11 +91,11 @@
Chunk Size high/med/low (bytes) |
Empty (avail.) Slots |
Used: High, Medium, Low Prio |
-Node-Cache Hit:Miss Uniq:Doub Flush
|
+Node-Cache Hit:Miss Uniq:Doub Del:Flush
|
Size Max |
Size Current |
-Hit-Cache Hit:Miss Uniq:Doub Flush
|
-Miss-Cache Hit:Miss Uniq:Doub Flush
|
+Hit-Cache Hit:Miss Uniq:Doub Del:Flush
|
+Miss-Cache Hit:Miss Uniq:Doub Del:Flush
|
Used Now |
Assigned Max |
Default Max |
diff --git a/htroot/PerformanceMemory_p.java b/htroot/PerformanceMemory_p.java
index b7a9842af..f13a10424 100644
--- a/htroot/PerformanceMemory_p.java
+++ b/htroot/PerformanceMemory_p.java
@@ -300,15 +300,15 @@ public class PerformanceMemory_p {
prop.put("sllow" + db, slt[3]);
prop.put("slhittmiss" + db, slt[4] + ":" + slt[5]);
prop.put("sluniqdoub" + db, slt[6] + ":" + slt[7]);
- prop.put("slflush" + db, slt[8]);
+ prop.put("slflush" + db, slt[8] + ":" + slt[9]);
prop.put("ochunkmax" + db, ost[0]);
prop.put("ochunkcur" + db, ost[1]);
prop.put("ohittmiss" + db, ost[5] + ":" + ost[6]);
prop.put("ouniqdoub" + db, ost[7] + ":" + ost[8]);
- prop.put("oflush" + db, ost[9]);
- prop.put("nhittmiss" + db, ost[10] + ":" + ost[11]);
- prop.put("nuniqdoub" + db, ost[12] + ":" + ost[13]);
- prop.put("nflush" + db, ost[14]);
+ prop.put("oflush" + db, ost[9] + ":" + ost[10]);
+ prop.put("nhittmiss" + db, ost[11] + ":" + ost[12]);
+ prop.put("nuniqdoub" + db, ost[13] + ":" + ost[14]);
+ prop.put("nflush" + db, ost[15] + ":" + ost[16]);
prop.put("used" + db, usd / KB);
prop.put("good" + db, god / KB);
prop.put("best" + db, bst / KB);
diff --git a/source/de/anomic/kelondro/kelondroObjectCache.java b/source/de/anomic/kelondro/kelondroObjectCache.java
index 5d9450711..2547c3649 100644
--- a/source/de/anomic/kelondro/kelondroObjectCache.java
+++ b/source/de/anomic/kelondro/kelondroObjectCache.java
@@ -66,8 +66,8 @@ public class kelondroObjectCache {
private int maxSize;
private long maxAge;
private long minMem;
- private int readHit, readMiss, writeUnique, writeDouble, cacheFlush;
- private int hasnotHit, hasnotMiss, hasnotUnique, hasnotDouble, hasnotFlush;
+ private int readHit, readMiss, writeUnique, writeDouble, cacheDelete, cacheFlush;
+ private int hasnotHit, hasnotMiss, hasnotUnique, hasnotDouble, hasnotDelete, hasnotFlush;
private String name;
public kelondroObjectCache(String name, int maxSize, long maxAge, long minMem) {
@@ -83,11 +83,13 @@ public class kelondroObjectCache {
this.readMiss = 0;
this.writeUnique = 0;
this.writeDouble = 0;
+ this.cacheDelete = 0;
this.cacheFlush = 0;
this.hasnotHit = 0;
this.hasnotMiss = 0;
this.hasnotUnique = 0;
this.hasnotDouble = 0;
+ this.hasnotDelete = 0;
this.hasnotFlush = 0;
}
@@ -136,11 +138,13 @@ public class kelondroObjectCache {
Integer.toString(readMiss),
Integer.toString(writeUnique),
Integer.toString(writeDouble),
+ Integer.toString(cacheDelete),
Integer.toString(cacheFlush),
Integer.toString(hasnotHit),
Integer.toString(hasnotMiss),
Integer.toString(hasnotUnique),
Integer.toString(hasnotDouble),
+ Integer.toString(hasnotDelete),
Integer.toString(hasnotFlush)
};
}
@@ -161,7 +165,9 @@ public class kelondroObjectCache {
Integer.toString(Integer.parseInt(a[11]) + Integer.parseInt(b[11])),
Integer.toString(Integer.parseInt(a[12]) + Integer.parseInt(b[12])),
Integer.toString(Integer.parseInt(a[13]) + Integer.parseInt(b[13])),
- Integer.toString(Integer.parseInt(a[14]) + Integer.parseInt(b[14]))
+ Integer.toString(Integer.parseInt(a[14]) + Integer.parseInt(b[14])),
+ Integer.toString(Integer.parseInt(a[15]) + Integer.parseInt(b[15])),
+ Integer.toString(Integer.parseInt(a[16]) + Integer.parseInt(b[16]))
};
}
@@ -190,7 +196,7 @@ public class kelondroObjectCache {
synchronized(cache) {
prev = cache.put(key, value);
ages.setScore(key, intTime(System.currentTimeMillis()));
- hasnot.deleteScore(key);
+ if (hasnot.deleteScore(key) != 0) hasnotDelete++;
}
if (prev == null) this.writeUnique++; else this.writeDouble++;
flushc();
@@ -205,10 +211,14 @@ public class kelondroObjectCache {
Object r = null;
synchronized(cache) {
r = cache.get(key);
- ages.setScore(key, intTime(System.currentTimeMillis())); // renew cache update time
+ if (r == null) {
+ this.readMiss++;
+ } else {
+ this.readHit++;
+ ages.setScore(key, intTime(System.currentTimeMillis())); // renew cache update time
+ }
}
flushc();
- if (r == null) this.readMiss++; else this.readHit++;
return r;
}
@@ -220,7 +230,7 @@ public class kelondroObjectCache {
if (key == null) return;
int prev = 0;
synchronized(cache) {
- cache.remove(key);
+ if (cache.remove(key) != null) cacheDelete++;
ages.deleteScore(key);
prev = hasnot.getScore(key);
hasnot.setScore(key, intTime(System.currentTimeMillis()));
@@ -259,7 +269,7 @@ public class kelondroObjectCache {
public void remove(String key) {
if (key == null) return;
synchronized(cache) {
- cache.remove(key);
+ if (cache.remove(key) != null) cacheDelete++;
ages.deleteScore(key);
hasnot.setScore(key, intTime(System.currentTimeMillis()));
}
diff --git a/source/de/anomic/kelondro/kelondroRecords.java b/source/de/anomic/kelondro/kelondroRecords.java
index 869c307ee..106f8392e 100644
--- a/source/de/anomic/kelondro/kelondroRecords.java
+++ b/source/de/anomic/kelondro/kelondroRecords.java
@@ -153,7 +153,7 @@ public class kelondroRecords {
private int cacheSize; // number of cache records
private long cacheStartup; // startup time; for cache aging
private kelondroMScoreCluster cacheScore; // controls cache aging
- private int readHit, readMiss, writeUnique, writeDouble, cacheFlush;
+ private int readHit, readMiss, writeUnique, writeDouble, cacheDelete, cacheFlush;
// optional logger
protected Logger theLogger = null;
@@ -443,6 +443,7 @@ public class kelondroRecords {
this.readMiss = 0;
this.writeUnique = 0;
this.writeDouble = 0;
+ this.cacheDelete = 0;
this.cacheFlush = 0;
}
@@ -476,7 +477,7 @@ public class kelondroRecords {
}
public int[] cacheNodeStatus() {
- if (cacheHeaders == null) return new int[]{0,0,0,0,0,0,0,0,0};
+ if (cacheHeaders == null) return new int[]{0,0,0,0,0,0,0,0,0,0};
return new int[]{
cacheSize,
cacheHeaders[CP_HIGH].size(),
@@ -486,6 +487,7 @@ public class kelondroRecords {
readMiss,
writeUnique,
writeDouble,
+ cacheDelete,
cacheFlush
};
}
@@ -533,7 +535,7 @@ public class kelondroRecords {
// no cache control for low-priority entries
cacheHeaders[CP_LOW].remove(handle);
}
- cacheFlush++;
+ cacheDelete++;
}
}
dispose(handle);
diff --git a/source/de/anomic/kelondro/kelondroTree.java b/source/de/anomic/kelondro/kelondroTree.java
index 19f3cf64a..45b92e9f7 100644
--- a/source/de/anomic/kelondro/kelondroTree.java
+++ b/source/de/anomic/kelondro/kelondroTree.java
@@ -164,7 +164,7 @@ public class kelondroTree extends kelondroRecords implements kelondroIndex {
if (objectCachePercent > 0) {
long objectbuffersize = objectCachePercent * buffersize / 100;
long nodecachesize = objectbuffersize / cacheObjectChunkSize();
- this.objectCache = new kelondroObjectCache(this.filename, (int) nodecachesize, nodecachesize * 300 , 4*1024*1024);
+ this.objectCache = new kelondroObjectCache(this.filename, (int) nodecachesize, nodecachesize * 3000 , 2*1024*1024);
} else {
this.objectCache = null;
}
diff --git a/yacy.init b/yacy.init
index 311463270..0eabe6004 100644
--- a/yacy.init
+++ b/yacy.init
@@ -499,10 +499,10 @@ xpstopw=true
ramCacheRWI = 8388608
# ram cache for responseHeader.db
-ramCacheHTTP = 4194304
+ramCacheHTTP = 1048576
# ram cache for urlHash.db
-ramCacheLURL = 4194304
+ramCacheLURL = 8388608
# ram cache for urlNotice.db
ramCacheNURL = 4194304
@@ -511,7 +511,7 @@ ramCacheNURL = 4194304
ramCacheEURL = 8192
# ram cache for seedDBs
-ramCacheDHT = 8192
+ramCacheDHT = 131072
# ram cache for message.db
ramCacheMessage = 8192
@@ -523,10 +523,10 @@ ramCacheWiki = 8192
ramCacheBlog = 2048
# ram cache for news1.db
-ramCacheNews = 8192
+ramCacheNews = 1048576
# ram cache for robotsTxt.db
-ramCacheRobots = 2097152
+ramCacheRobots = 4194304
# ram cache for crawlProfile.db
ramCacheProfiles = 8192