From dbd1eeead5005099c7a276bc2c1ef018a71479ac Mon Sep 17 00:00:00 2001 From: orbiter Date: Sun, 9 Sep 2007 18:35:05 +0000 Subject: [PATCH] fix for missing object miss-cache flush value: the value is alway zero because there is no miss-cache flush see http://forum.yacy-websuche.de/viewtopic.php?f=6&t=288 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4083 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/PerformanceMemory_p.html | 6 ++-- htroot/PerformanceMemory_p.java | 6 ++-- source/de/anomic/kelondro/kelondroCache.java | 31 ++------------------ 3 files changed, 8 insertions(+), 35 deletions(-) diff --git a/htroot/PerformanceMemory_p.html b/htroot/PerformanceMemory_p.html index b9a915046..e13dc0ad8 100644 --- a/htroot/PerformanceMemory_p.html +++ b/htroot/PerformanceMemory_p.html @@ -130,7 +130,7 @@ Read Hit Cache - Read Miss Cache + Read Miss Cache Table @@ -151,7 +151,7 @@ Write Unique Write Double Deletes - Flushes + #{ObjectList}# @@ -173,7 +173,7 @@ #[objectMissCacheWriteUnique]# #[objectMissCacheWriteDouble]# #[objectMissCacheDeletes]# - #[objectMissCacheFlushes]# + #{/ObjectList}# diff --git a/htroot/PerformanceMemory_p.java b/htroot/PerformanceMemory_p.java index 030a7a74c..ad0f281e6 100644 --- a/htroot/PerformanceMemory_p.java +++ b/htroot/PerformanceMemory_p.java @@ -194,7 +194,7 @@ public class PerformanceMemory_p { prop.put("ObjectList_" + c + "_objectMissCacheWriteUnique", map.get("objectMissCacheWriteUnique")); prop.put("ObjectList_" + c + "_objectMissCacheWriteDouble", map.get("objectMissCacheWriteDouble")); prop.put("ObjectList_" + c + "_objectMissCacheDeletes", map.get("objectMissCacheDeletes")); - prop.put("ObjectList_" + c + "_objectMissCacheFlushes", map.get("objectMissCacheFlushes")); + //prop.put("ObjectList_" + c + "_objectMissCacheFlushes", map.get("objectMissCacheFlushes")); c++; } @@ -205,9 +205,9 @@ public class PerformanceMemory_p { prop.put("objectMissCacheTotalMem", totalmissmem / (1024 * 1024)); // parse initialization memory settings - String Xmx = env.getConfig("javastart_Xmx", "Xmx64m").substring(3); + String Xmx = env.getConfig("javastart_Xmx", "Xmx96m").substring(3); prop.put("Xmx", Xmx.substring(0, Xmx.length() - 1)); - String Xms = env.getConfig("javastart_Xms", "Xms10m").substring(3); + String Xms = env.getConfig("javastart_Xms", "Xms96m").substring(3); prop.put("Xms", Xms.substring(0, Xms.length() - 1)); // other caching structures diff --git a/source/de/anomic/kelondro/kelondroCache.java b/source/de/anomic/kelondro/kelondroCache.java index bb5b4a9e3..05293398e 100644 --- a/source/de/anomic/kelondro/kelondroCache.java +++ b/source/de/anomic/kelondro/kelondroCache.java @@ -61,7 +61,7 @@ public class kelondroCache implements kelondroIndex { private kelondroIndex index; private kelondroRow keyrow; private int readHit, readMiss, writeUnique, writeDouble, cacheDelete, cacheFlush; - private int hasnotHit, hasnotMiss, hasnotUnique, hasnotDouble, hasnotDelete, hasnotFlush; + private int hasnotHit, hasnotMiss, hasnotUnique, hasnotDouble, hasnotDelete; private boolean read, write; public kelondroCache(kelondroIndex backupIndex, boolean read, boolean write) { @@ -90,7 +90,6 @@ public class kelondroCache implements kelondroIndex { this.hasnotUnique = 0; this.hasnotDouble = 0; this.hasnotDelete = 0; - this.hasnotFlush = 0; } public final int cacheObjectChunkSize() { @@ -154,7 +153,7 @@ public class kelondroCache implements kelondroIndex { map.put("objectMissCacheWriteUnique", Integer.toString(hasnotUnique)); map.put("objectMissCacheWriteDouble", Integer.toString(hasnotDouble)); map.put("objectMissCacheDeletes", Integer.toString(hasnotDelete)); - map.put("objectMissCacheFlushes", Integer.toString(hasnotFlush)); + map.put("objectMissCacheFlushes", "0"); // a miss cache flush can only happen if we have a deletion cache (which we dont have) // future feature .. map.put("objectElderTimeRead", index.profile().) return map; @@ -456,32 +455,6 @@ public class kelondroCache implements kelondroIndex { // The write buffer does not work here, because it does not store dates. throw new UnsupportedOperationException("put with date is inefficient in kelondroCache"); - /* - if (entryDate == null) return put(row); - - assert (row != null); - assert (row.columns() == row().columns()); - //assert (!(serverLog.allZero(row.getColBytes(index.primarykey())))); - assert (writeBufferUnique == null); - assert (writeBufferDoubles == null); - - byte[] key = row.getColBytes(index.row().primaryKey); - checkHitSpace(); - - // remove entry from miss- and hit-cache - if (readMissCache != null) { - this.readMissCache.remove(key); - this.hasnotDelete++; - } - - // the worst case: we must write to the backend directly - Entry entry = index.put(row); - if (readHitCache != null) { - kelondroRow.Entry dummy = readHitCache.put(row); // learn that entry - if (dummy == null) this.writeUnique++; else this.writeDouble++; - } - return entry; - */ } public synchronized void addUnique(Entry row) throws IOException {