From 1b4a27cd99635845ee39ef8386ea7cae464fd361 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 23 May 2006 22:59:39 +0000 Subject: [PATCH] added monitoring for new miss-cache git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2137 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/PerformanceMemory_p.html | 73 ++++++++----------- htroot/PerformanceMemory_p.java | 15 +--- .../anomic/kelondro/kelondroObjectCache.java | 8 +- 3 files changed, 38 insertions(+), 58 deletions(-) diff --git a/htroot/PerformanceMemory_p.html b/htroot/PerformanceMemory_p.html index 5fdeb3639..82f42a46c 100644 --- a/htroot/PerformanceMemory_p.html +++ b/htroot/PerformanceMemory_p.html @@ -82,7 +82,7 @@ Database
  DB Size
  Node Cache -Object Cache +Object Cache Memory Occupation (KBytes) Description
  @@ -90,10 +90,11 @@ Chunk Size
high/med/low
(bytes) Empty
(avail.)
Slots -Used:
High, Medium, Low
Prio +Used: High, Medium, Low Prio  
Size
Max  
Size
Current -Ratio
Hit:Miss
Unique:Double
+Cache
Hit:Miss
Unique:Double
Flush
+Miss
Hit:Miss
Unique:Double
Flush
Used Now Assigned Max Default Max @@ -109,7 +110,8 @@ #[slhigRWI]#
#[slmedRWI]#
#[sllowRWI]# #[ochunkmaxRWI]# #[ochunkcurRWI]# -#[ohittmissRWI]#
#[ouniqdoubRWI]# +#[ohittmissRWI]#
#[ouniqdoubRWI]#
#[oflushRWI]# +#[nhittmissRWI]#
#[nuniqdoubRWI]#
#[nflushRWI]# #[usedRWI]# #[dfltRWI]# @@ -128,7 +130,8 @@ cache will speed up crawls with a depth > 3. #[slhigHTTP]#
#[slmedHTTP]#
#[sllowHTTP]# #[ochunkmaxHTTP]# #[ochunkcurHTTP]# -#[ohittmissHTTP]#
#[ouniqdoubHTTP]# +#[ohittmissHTTP]#
#[ouniqdoubHTTP]#
#[oflushHTTP]# +#[nhittmissHTTP]#
#[nuniqdoubHTTP]#
#[nflushHTTP]# #[usedHTTP]# #[dfltHTTP]# @@ -147,7 +150,8 @@ Increasing this cache will be most important for a fast proxy mode. #[slhigLURL]#
#[slmedLURL]#
#[sllowLURL]# #[ochunkmaxLURL]# #[ochunkcurLURL]# -#[ohittmissLURL]#
#[ouniqdoubLURL]# +#[ohittmissLURL]#
#[ouniqdoubLURL]#
#[oflushLURL]# +#[nhittmissLURL]#
#[nuniqdoubLURL]#
#[nflushLURL]# #[usedLURL]# #[dfltLURL]# @@ -165,7 +169,8 @@ This cache is very important for a fast search process. Increasing the cache siz #[slhigNURL]#
#[slmedNURL]#
#[sllowNURL]# #[ochunkmaxNURL]# #[ochunkcurNURL]# -#[ohittmissNURL]#
#[ouniqdoubNURL]# +#[ohittmissNURL]#
#[ouniqdoubNURL]#
#[oflushNURL]# +#[nhittmissNURL]#
#[nuniqdoubNURL]#
#[nflushNURL]# #[usedNURL]# #[dfltNURL]# @@ -183,7 +188,8 @@ Increasing the cache size will result in faster double-check during URL recognit #[slhigEURL]#
#[slmedEURL]#
#[sllowEURL]# #[ochunkmaxEURL]# #[ochunkcurEURL]# -#[ohittmissEURL]#
#[ouniqdoubEURL]# +#[ohittmissEURL]#
#[ouniqdoubEURL]#
#[oflushEURL]# +#[nhittmissEURL]#
#[nuniqdoubEURL]#
#[nflushEURL]# #[usedEURL]# #[dfltEURL]# @@ -201,7 +207,8 @@ Increasing the cache size will most probably speed up crawling slightly, but not #[slhigDHT]#
#[slmedDHT]#
#[sllowDHT]# #[ochunkmaxDHT]# #[ochunkcurDHT]# -#[ohittmissDHT]#
#[ouniqdoubDHT]# +#[ohittmissDHT]#
#[ouniqdoubDHT]#
#[oflushDHT]# +#[nhittmissDHT]#
#[nuniqdoubDHT]#
#[nflushDHT]# #[usedDHT]# #[dfltDHT]# @@ -220,7 +227,8 @@ Increasing this cache may speed up many functions, but we need to test this to s #[slhigMessage]#
#[slmedMessage]#
#[sllowMessage]# #[ochunkmaxMessage]# #[ochunkcurMessage]# -#[ohittmissMessage]#
#[ouniqdoubMessage]# +#[ohittmissMessage]#
#[ouniqdoubMessage]#
#[oflushMessage]# +#[nhittmissMessage]#
#[nuniqdoubMessage]#
#[nflushMessage]# #[usedMessage]# #[dfltMessage]# @@ -237,7 +245,8 @@ Increasing this cache may speed up many functions, but we need to test this to s #[slhigWiki]#
#[slmedWiki]#
#[sllowWiki]# #[ochunkmaxWiki]# #[ochunkcurWiki]# -#[ohittmissWiki]#
#[ouniqdoubWiki]# +#[ohittmissWiki]#
#[ouniqdoubWiki]#
#[oflushWiki]# +#[nhittmissWiki]#
#[nuniqdoubWiki]#
#[nflushWiki]# #[usedWiki]# #[dfltWiki]# @@ -256,7 +265,8 @@ Increasing this cache may speed up access to the wiki pages. #[slhigBlog]#
#[slmedBlog]#
#[sllowBlog]# #[ochunkmaxBlog]# #[ochunkcurBlog]# -#[ohittmissBlog]#
#[ouniqdoubBlog]# +#[ohittmissBlog]#
#[ouniqdoubBlog]#
#[oflushBlog]# +#[nhittmissBlog]#
#[nuniqdoubBlog]#
#[nflushBlog]# #[usedBlog]# #[dfltBlog]# @@ -274,7 +284,8 @@ Increasing this cache may speed up access to the Blog. #[slhigNews]#
#[slmedNews]#
#[sllowNews]# #[ochunkmaxNews]# #[ochunkcurNews]# -#[ohittmissNews]#
#[ouniqdoubNews]# +#[ohittmissNews]#
#[ouniqdoubNews]#
#[oflushNews]# +#[nhittmissNews]#
#[nuniqdoubNews]#
#[nflushNews]# #[usedNews]# #[dfltNews]# @@ -292,7 +303,8 @@ Increasing this cache may speed up the peer-ping. #[slhigRobots]#
#[slmedRobots]#
#[sllowRobots]# #[ochunkmaxRobots]# #[ochunkcurRobots]# -#[ohittmissRobots]#
#[ouniqdoubRobots]# +#[ohittmissRobots]#
#[ouniqdoubRobots]#
#[oflushRobots]# +#[nhittmissRobots]#
#[nuniqdoubRobots]#
#[nflushRobots]# #[usedRobots]# #[dfltRobots]# @@ -310,7 +322,8 @@ Increasing this cache may speed up validation if crawling of the URL is allowed. #[slhigProfiles]#
#[slmedProfiles]#
#[sllowProfiles]# #[ochunkmaxProfiles]# #[ochunkcurProfiles]# -#[ohittmissProfiles]#
#[ouniqdoubProfiles]# +#[ohittmissProfiles]#
#[ouniqdoubProfiles]#
#[oflushProfiles]# +#[nhittmissProfiles]#
#[nuniqdoubProfiles]#
#[nflushProfiles]# #[usedProfiles]# #[dfltProfiles]# @@ -321,7 +334,7 @@ Increasing this cache may speed up crawling, but not much space is needed, so th -Totals +Totals #[usedTotal]# MB #[currTotal]# MB #[dfltTotal]# MB @@ -331,7 +344,7 @@ Increasing this cache may speed up crawling, but not much space is needed, so th -Re-Configuration: +Re-Configuration:
these
custom
values
 
all
default
values
 
all
recom-
mended values @@ -369,32 +382,6 @@ Increasing this cache may speed up crawling, but not much space is needed, so th

--> - -
Other caching structures:
- - - - - - - - - - - - - - - - - - - - - -
TypeAmountSize
EURL existsIndex#[eurl.existsIndexAmount]##[eurl.existsIndexSize]#
NURL existsIndex#[nurl.existsIndexAmount]##[nurl.existsIndexSize]#
LURL existsIndex#[lurl.existsIndexAmount]##[lurl.existsIndexSize]#
-

- #%env/templates/footer.template%# diff --git a/htroot/PerformanceMemory_p.java b/htroot/PerformanceMemory_p.java index 3107231dd..987b28fa3 100644 --- a/htroot/PerformanceMemory_p.java +++ b/htroot/PerformanceMemory_p.java @@ -284,17 +284,6 @@ public class PerformanceMemory_p { prop.put("heap" , Integer.toString(c)); */ - // other caching structures - long amount = 0; - prop.put("eurl.existsIndexAmount",Long.toString(amount)); - prop.put("eurl.existsIndexSize",serverMemory.bytesToString(amount*(2*indexURL.urlHashLength+28))); - amount = 0; - prop.put("nurl.existsIndexAmount",Long.toString(amount)); - prop.put("nurl.existsIndexSize",serverMemory.bytesToString(amount*(2*indexURL.urlHashLength+28))); - amount = 0; - prop.put("lurl.existsIndexAmount",Long.toString(amount)); - prop.put("lurl.existsIndexSize",serverMemory.bytesToString(amount*(2*indexURL.urlHashLength+28))); - // return rewrite values for templates return prop; } @@ -315,6 +304,10 @@ public class PerformanceMemory_p { 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("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 3fd2a1ff8..5d9450711 100644 --- a/source/de/anomic/kelondro/kelondroObjectCache.java +++ b/source/de/anomic/kelondro/kelondroObjectCache.java @@ -271,8 +271,8 @@ public class kelondroObjectCache { while ((ages.size() > 0) && ((k = (String) ages.getMinObject()) != null) && ((ages.size() > maxSize) || - ((System.currentTimeMillis() - longEmit(ages.getScore(k))) > maxAge) || - (Runtime.getRuntime().freeMemory() < minMem)) + (((System.currentTimeMillis() - longEmit(ages.getScore(k))) > maxAge) && + (Runtime.getRuntime().freeMemory() < minMem))) ) { cache.remove(k); ages.deleteScore(k); @@ -287,8 +287,8 @@ public class kelondroObjectCache { while ((hasnot.size() > 0) && ((k = (String) hasnot.getMinObject()) != null) && ((hasnot.size() > maxSize) || - ((System.currentTimeMillis() - longEmit(hasnot.getScore(k))) > maxAge) || - (Runtime.getRuntime().freeMemory() < minMem)) + (((System.currentTimeMillis() - longEmit(hasnot.getScore(k))) > maxAge) && + (Runtime.getRuntime().freeMemory() < minMem))) ) { hasnot.deleteScore(k); hasnotFlush++;