interface enhancements for eco records memory statistics

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4348 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent 9abc927645
commit 9eb746863d

@ -83,23 +83,25 @@
<p><strong>EcoTable RAM Index:</strong></p>
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom">
<td>Table</td>
<td>Key Chunk Size</td>
<td>Key Count</td>
<td>Key Used Memory</td>
<td>Value Chunk Size</td>
<td>Value Count</td>
<td>Value Used Memory</td>
<td rowspan="2">Table</td>
<td rowspan="2">Size</td>
<td colspan="2">Key</td>
<td colspan="2">Value</td>
</tr>
<tr class="TableHeader" valign="bottom">
<td>Chunk Size</td>
<td>Used Memory</td>
<td>Chunk Size</td>
<td>Used Memory</td>
</tr>
#{EcoList}#
<tr class="TableCellLight">
<td align="left" class="TableCellDark">#[tableIndexPath]#</td>
<td align="right">#[tableIndexChunkSize]#</td>
<td align="right">#[tableIndexCount]#</td>
<td align="right">#[tableIndexMem]#</td>
<td align="right">#[tableTailChunkSize]#</td>
<td align="right">#[tableTailCount]#</td>
<td align="right">#[tableTailMem]#</td>
<td align="right">#[tableSize]#</td>
<td align="right">#[tableKeyChunkSize]#</td>
<td align="right">#[tableKeyMem]#</td>
<td align="right">#[tableValueChunkSize]#</td>
<td align="right">#[tableValueMem]#</td>
</tr>
#{/EcoList}#
<tr class="TableCellDark">
@ -111,15 +113,15 @@
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom">
<td>Table</td>
<td>Chunk Size</td>
<td>Count</td>
<td>Chunk Size</td>
<td>Used Memory</td>
</tr>
#{TableList}#
<tr class="TableCellLight">
<td align="left" class="TableCellDark">#[tableIndexPath]#</td>
<td align="right">#[tableIndexChunkSize]#</td>
<td align="right">#[tableIndexCount]#</td>
<td align="right">#[tableIndexChunkSize]#</td>
<td align="right">#[tableIndexMem]#</td>
</tr>
#{/TableList}#
@ -132,8 +134,8 @@
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom">
<td>Table</td>
<td>Size</td>
<td>Chunk Size</td>
<td>Count</td>
<td>Used Memory</td>
<td>Read Hit</td>
<td>Read Miss</td>
@ -145,8 +147,8 @@
#{NodeList}#
<tr class="TableCellLight">
<td align="left" class="TableCellDark">#[nodeCachePath]#</td>
<td align="right">#[nodeChunkSize]#</td>
<td align="right">#[nodeCacheCount]#</td>
<td align="right">#[nodeChunkSize]#</td>
<td align="right">#[nodeCacheMem]#</td>
<td align="right">#[nodeCacheReadHit]#</td>
<td align="right">#[nodeCacheReadMiss]#</td>
@ -170,8 +172,8 @@
</tr>
<tr class="TableHeader" valign="bottom">
<td>Table</td>
<td>Size</td>
<td>Chunk Size</td>
<td>Count</td>
<td>Used Memory</td>
<td>Read Hit</td>
<td>Read Miss</td>
@ -179,8 +181,8 @@
<td>Write Double</td>
<td>Deletes</td>
<td>Flushes</td>
<td>Size</td>
<td>Chunk Size</td>
<td>Count</td>
<td>Used Memory</td>
<td>Read Hit</td>
<td>Read Miss</td>
@ -192,8 +194,8 @@
#{ObjectList}#
<tr class="TableCellLight">
<td align="left" class="TableCellDark">#[objectCachePath]#</td>
<td align="right">#[objectHitChunkSize]#</td>
<td align="right">#[objectHitCacheCount]#</td>
<td align="right">#[objectHitChunkSize]#</td>
<td align="right">#[objectHitCacheMem]#</td>
<td align="right">#[objectHitCacheReadHit]#</td>
<td align="right">#[objectHitCacheReadMiss]#</td>
@ -201,8 +203,8 @@
<td align="right">#[objectHitCacheWriteDouble]#</td>
<td align="right">#[objectHitCacheDeletes]#</td>
<td align="right">#[objectHitCacheFlushes]#</td>
<td align="right">#[objectMissChunkSize]#</td>
<td align="right">#[objectMissCacheCount]#</td>
<td align="right">#[objectMissChunkSize]#</td>
<td align="right">#[objectMissCacheMem]#</td>
<td align="right">#[objectMissCacheReadHit]#</td>
<td align="right">#[objectMissCacheReadMiss]#</td>

@ -141,20 +141,19 @@ public class PerformanceMemory_p {
totalmem = 0;
while (i.hasNext()) {
filename = (String) i.next();
prop.put("EcoList_" + c + "_tableIndexPath", ((p = filename.indexOf("DATA")) < 0) ? filename : filename.substring(p));
map = kelondroEcoTable.memoryStats(filename);
prop.put("EcoList_" + c + "_tableIndexPath", ((p = filename.indexOf("DATA")) < 0) ? filename : filename.substring(p));
prop.putNum("EcoList_" + c + "_tableSize", (String) map.get("tableSize"));
mem = Long.parseLong((String) map.get("tableIndexMem"));
mem = Long.parseLong((String) map.get("tableKeyMem"));
totalmem += mem;
prop.put("EcoList_" + c + "_tableIndexMem", serverMemory.bytesToString(mem));
prop.put("EcoList_" + c + "_tableIndexChunkSize", map.get("tableIndexChunkSize"));
prop.putNum("EcoList_" + c + "_tableIndexCount", (String)map.get("tableIndexCount"));
prop.put("EcoList_" + c + "_tableKeyMem", serverMemory.bytesToString(mem));
prop.put("EcoList_" + c + "_tableKeyChunkSize", map.get("tableKeyChunkSize"));
mem = Long.parseLong((String) map.get("tableTailMem"));
mem = Long.parseLong((String) map.get("tableValueMem"));
totalmem += mem;
prop.put("EcoList_" + c + "_tableTailMem", serverMemory.bytesToString(mem));
prop.put("EcoList_" + c + "_tableTailChunkSize", map.get("tableTailChunkSize"));
prop.putNum("EcoList_" + c + "_tableTailCount", (String)map.get("tableTailCount"));
prop.put("EcoList_" + c + "_tableValueMem", serverMemory.bytesToString(mem));
prop.put("EcoList_" + c + "_tableValueChunkSize", map.get("tableValueChunkSize"));
c++;
}

@ -27,12 +27,11 @@
#{EcoList}#
<entry>
<tableIndexPath>#[tableIndexPath]#</tableIndexPath>
<tableIndexChunkSize>#[tableIndexChunkSize]#</tableIndexChunkSize>
<tableIndexCount>#[tableIndexCount]#</tableIndexCount>
<tableIndexMem>#[tableIndexMem]#</tableIndexMem>
<tableTailChunkSize>#[tableTailChunkSize]#</tableTailChunkSize>
<tableTailCount>#[tableTailCount]#</tableTailCount>
<tableTailMem>#[tableTailMem]#</tableTailMem>
<tableCount>#[tableCount]#</tableCount>
<tableKeyChunkSize>#[tableKeyChunkSize]#</tableKeyChunkSize>
<tableKeyMem>#[tableKeyMem]#</tableKeyMem>
<tableValueChunkSize>#[tableValueChunkSize]#</tableValueChunkSize>
<tableValueMem>#[tableValueMem]#</tableValueMem>
</entry>
#{/EcoList}#
<EcoIndexTotalMem>#[EcoIndexTotalMem]#</EcoIndexTotalMem>

@ -155,13 +155,13 @@ public class kelondroEcoTable implements kelondroIndex {
private final Map<String, String> memoryStats() {
// returns statistical data about this object
assert ((table == null) || (table.size() == index.size()));
HashMap<String, String> map = new HashMap<String, String>();
map.put("tableIndexChunkSize", Integer.toString(index.row().objectsize));
map.put("tableIndexCount", Integer.toString(index.size()));
map.put("tableIndexMem", Integer.toString((int) (index.row().objectsize * index.size() * kelondroRowCollection.growfactor)));
map.put("tableTailChunkSize", (table == null) ? "0" : Integer.toString(table.row().objectsize));
map.put("tableTailCount", (table == null) ? "0" : Integer.toString(table.size()));
map.put("tableTailMem", (table == null) ? "0" : Integer.toString((int) (table.row().objectsize * table.size() * kelondroRowCollection.growfactor)));
map.put("tableSize", Integer.toString(index.size()));
map.put("tableKeyChunkSize", Integer.toString(index.row().objectsize));
map.put("tableKeyMem", Integer.toString((int) (index.row().objectsize * index.size() * kelondroRowCollection.growfactor)));
map.put("tableValueChunkSize", (table == null) ? "0" : Integer.toString(table.row().objectsize));
map.put("tableValueMem", (table == null) ? "0" : Integer.toString((int) (table.row().objectsize * table.size() * kelondroRowCollection.growfactor)));
return map;
}

@ -75,8 +75,8 @@ public class plasmaCrawlQueues {
log.logConfig("Starting Crawling Management");
noticeURL = new plasmaCrawlNURL(plasmaPath);
//errorURL = new plasmaCrawlZURL(); // fresh error DB each startup; can be hold in RAM and reduces IO;
errorURL = new plasmaCrawlZURL(plasmaPath, "urlError2.db", true);
delegatedURL = new plasmaCrawlZURL(plasmaPath, "urlDelegated2.db", false);
errorURL = new plasmaCrawlZURL(plasmaPath, "urlError2.db", false);
delegatedURL = new plasmaCrawlZURL(plasmaPath, "urlDelegated2.db", true);
}

@ -58,6 +58,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
@ -191,7 +192,7 @@ public final class plasmaCrawlLURL {
return; // this did not need to be stored, but is updated
}
urlIndexFile.put(entry.toRowEntry(), entry.loaddate());
urlIndexFile.put(entry.toRowEntry(), new Date() /*entry.loaddate()*/);
}
public synchronized indexURLEntry newEntry(String propStr) {

Loading…
Cancel
Save