summaryrefslogtreecommitdiff
path: root/htroot
diff options
context:
space:
mode:
authororbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2010-09-02 21:52:45 +0000
committerorbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2010-09-02 21:52:45 +0000
commit5de70c3d7c869debbb00821beda7396eb57aa183 (patch)
tree77bb97affd293c3eb3684c60ff148dc03f2e05b9 /htroot
parent9d080f387ec62dd48d9e0ecd011a69daa20849b6 (diff)
changed way of storage for search requests:
- the search request cache can now get as large as 1000 entries - if more entries arrive, unused are deleted - the elements may stay in the cache up to 10 minutes and longer if they are used - the elements are deleted earlier that 10 minutes if the memory gets low This commit was mainly done for metager-feeding peers that have a query load of 50000 queries each day. Also added: - a monitor for cache hit/cache miss in PerformanceMemory_p.html (see at bottom of page) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7093 6c8d7289-2bf4-0310-a012-ef5d649a1542
Diffstat (limited to 'htroot')
-rw-r--r--htroot/PerformanceMemory_p.html36
-rw-r--r--htroot/PerformanceMemory_p.java16
2 files changed, 44 insertions, 8 deletions
diff --git a/htroot/PerformanceMemory_p.html b/htroot/PerformanceMemory_p.html
index e0fac875b..bc7b2cfb6 100644
--- a/htroot/PerformanceMemory_p.html
+++ b/htroot/PerformanceMemory_p.html
@@ -184,19 +184,51 @@
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom">
<td>Type</td>
- <td>Amount</td>
+ <td>Size</td>
+ <td>Hit</td>
+ <td>Miss</td>
+ <td>Insert</td>
+ <td>Delete</td>
</tr>
<tr class="TableCellLight">
<td>DNSCache</td>
- <td>#[namecache.hit]#</td>
+ <td>#[namecacheHit.size]#</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="TableCellLight">
+ <td>DNSCache</td>
+ <td>#[namecacheMiss.size]#</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
</tr>
<tr class="TableCellDark">
<td>DNSNoCache</td>
+ <td></td>
<td>#[namecache.noCache]#</td>
+ <td></td>
+ <td></td>
+ <td></td>
</tr>
<tr class="TableCellLight">
<td>HashBlacklistedCache</td>
<td>#[blacklistcache.size]#</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="TableCellLight">
+ <td>Search Event Cache</td>
+ <td>#[searchevent.size]#</td>
+ <td>#[searchevent.hit]#</td>
+ <td>#[searchevent.miss]#</td>
+ <td>#[searchevent.insert]#</td>
+ <td>#[searchevent.delete]#</td>
</tr>
</table>
diff --git a/htroot/PerformanceMemory_p.java b/htroot/PerformanceMemory_p.java
index 0b874e7a7..49c01b95a 100644
--- a/htroot/PerformanceMemory_p.java
+++ b/htroot/PerformanceMemory_p.java
@@ -38,6 +38,7 @@ import net.yacy.kelondro.util.FileUtils;
import net.yacy.kelondro.util.Formatter;
import net.yacy.kelondro.util.MemoryControl;
+import de.anomic.search.SearchEventCache;
import de.anomic.search.Switchboard;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
@@ -187,12 +188,15 @@ public class PerformanceMemory_p {
prop.putNum("objectMissCacheTotalMem", totalmissmem / (1024 * 1024d));
// other caching structures
- long amount = Domains.nameCacheHitSize();
- prop.putNum("namecache.hit", amount);
- amount = Domains.nameCacheNoCachingListSize();
- prop.putNum("namecache.noCache", amount);
- amount = Switchboard.urlBlacklist.blacklistCacheSize();
- prop.putNum("blacklistcache.size", amount);
+ prop.putNum("namecacheHit.size", Domains.nameCacheHitSize());
+ prop.putNum("namecacheMiss.size", Domains.nameCacheMissSize());
+ prop.putNum("namecache.noCache", Domains.nameCacheNoCachingListSize());
+ prop.putNum("blacklistcache.size", Switchboard.urlBlacklist.blacklistCacheSize());
+ prop.putNum("searchevent.size", SearchEventCache.size());
+ prop.putNum("searchevent.hit", SearchEventCache.cacheHit);
+ prop.putNum("searchevent.miss", SearchEventCache.cacheMiss);
+ prop.putNum("searchevent.insert", SearchEventCache.cacheInsert);
+ prop.putNum("searchevent.delete", SearchEventCache.cacheDelete);
// return rewrite values for templates
return prop;
}