git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@751 6c8d7289-2bf4-0310-a012-ef5d649a1542pull/1/head
parent
0f1bbff459
commit
fb52a82008
@ -0,0 +1,189 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy '#[clientname]#': Performance Settings for Memory</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Performance Settings for Memory</h2>
|
||||
|
||||
<p>
|
||||
<div class=small><b>RAM Cache for Database Files:</b></div>
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<form action="PerformanceMemory_p.html" method="post" enctype="multipart/form-data">
|
||||
<tr class="TableHeader" valign="bottom">
|
||||
<td class="small">Database<br></td>
|
||||
<td class="small">Chunk Size<br>(bytes)</td>
|
||||
<td class="small">#Needed Slots<br>(= DB Size)</td>
|
||||
<td class="small">#Empty Slots<br> </td>
|
||||
<td class="small">#Used Slots<br>High Priority</td>
|
||||
<td class="small">#Used Slots<br>Medium Priority</td>
|
||||
<td class="small">#Used Slots<br>Low Priority</td>
|
||||
<td class="small">Used<br>Size</td>
|
||||
<td class="small">Assigned<br>Max-Size</td>
|
||||
<td class="small">Recommended<br>Max-Size</td>
|
||||
<td class="small">Optimum<br>Max-Size</td>
|
||||
<td class="small">Description<br> </td>
|
||||
</tr>
|
||||
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">RWI Assortment Cluster</td>
|
||||
<td class="small" align="right">#[chunkRWI]#</td>
|
||||
<td class="small" align="right">#[slreqRWI]#</td>
|
||||
<td class="small" align="right">#[slempRWI]#</td>
|
||||
<td class="small" align="right">#[slhigRWI]#</td>
|
||||
<td class="small" align="right">#[slmedRWI]#</td>
|
||||
<td class="small" align="right">#[sllowRWI]#</td>
|
||||
<td class="small" align="right">#[usedRWI]#</td>
|
||||
<td class="small" align="right"><input name="ramCacheRWI" type="text" align="right" size="8" maxlength="9" value="#[ramCacheRWI]#"> bytes</td>
|
||||
<td class="small" align="right">#[goodRWI]#</td>
|
||||
<td class="small" align="right">#[bestRWI]#</td>
|
||||
<td class="small" align="left">The Assortment Cluster stores most of the page indexes.
|
||||
Flushing speed of the temporary RWI cache depends on the size of this file cache. Increasing the space of this
|
||||
cache will speed up crawls with a depth > 3.</td>
|
||||
</tr>
|
||||
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">HTTP Response Header</td>
|
||||
<td class="small" align="right">#[chunkHTTP]#</td>
|
||||
<td class="small" align="right">#[slreqHTTP]#</td>
|
||||
<td class="small" align="right">#[slempHTTP]#</td>
|
||||
<td class="small" align="right">#[slhigHTTP]#</td>
|
||||
<td class="small" align="right">#[slmedHTTP]#</td>
|
||||
<td class="small" align="right">#[sllowHTTP]#</td>
|
||||
<td class="small" align="right">#[usedHTTP]#</td>
|
||||
<td class="small" align="right"><input name="ramCacheHTTP" type="text" align="right" size="8" maxlength="9" value="#[ramCacheHTTP]#"> bytes</td>
|
||||
<td class="small" align="right">#[goodHTTP]#</td>
|
||||
<td class="small" align="right">#[bestHTTP]#</td>
|
||||
<td class="small" align="left">The Response Header database stores the HTTP heades that other servers send when YaCy retrieves web pages
|
||||
during proxy mode, when performing crawls or if it fetches pages for snippet generation.
|
||||
Increasing this cache will be most important for a fast proxy mode.</td>
|
||||
</tr>
|
||||
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">'loaded' URLs</td>
|
||||
<td class="small" align="right">#[chunkLURL]#</td>
|
||||
<td class="small" align="right">#[slreqLURL]#</td>
|
||||
<td class="small" align="right">#[slempLURL]#</td>
|
||||
<td class="small" align="right">#[slhigLURL]#</td>
|
||||
<td class="small" align="right">#[slmedLURL]#</td>
|
||||
<td class="small" align="right">#[sllowLURL]#</td>
|
||||
<td class="small" align="right">#[usedLURL]#</td>
|
||||
<td class="small" align="right"><input name="ramCacheLURL" type="text" align="right" size="8" maxlength="9" value="#[ramCacheLURL]#"> bytes</td>
|
||||
<td class="small" align="right">#[goodLURL]#</td>
|
||||
<td class="small" align="right">#[bestLURL]#</td>
|
||||
<td class="small" align="left">This is the database that holds the hash/url - relation and properties regarding the url like load date and server date.
|
||||
This cache is very important for a fast search process. Increasing the cache size will result in more search results and less IO during DHT transfer.</td>
|
||||
</tr>
|
||||
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">'noticed' URLs</td>
|
||||
<td class="small" align="right">#[chunkNURL]#</td>
|
||||
<td class="small" align="right">#[slreqNURL]#</td>
|
||||
<td class="small" align="right">#[slempNURL]#</td>
|
||||
<td class="small" align="right">#[slhigNURL]#</td>
|
||||
<td class="small" align="right">#[slmedNURL]#</td>
|
||||
<td class="small" align="right">#[sllowNURL]#</td>
|
||||
<td class="small" align="right">#[usedNURL]#</td>
|
||||
<td class="small" align="right"><input name="ramCacheNURL" type="text" align="right" size="8" maxlength="9" value="#[ramCacheNURL]#"> bytes</td>
|
||||
<td class="small" align="right">#[goodNURL]#</td>
|
||||
<td class="small" align="right">#[bestNURL]#</td>
|
||||
<td class="small" align="left">A noticed URL is one that was discovered during crawling but was not loaded yet.
|
||||
Increasing the cache size will result in faster double-check during URL recognition when doing crawls.</td>
|
||||
</tr>
|
||||
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">'error' URLs</td>
|
||||
<td class="small" align="right">#[chunkEURL]#</td>
|
||||
<td class="small" align="right">#[slreqEURL]#</td>
|
||||
<td class="small" align="right">#[slempEURL]#</td>
|
||||
<td class="small" align="right">#[slhigEURL]#</td>
|
||||
<td class="small" align="right">#[slmedEURL]#</td>
|
||||
<td class="small" align="right">#[sllowEURL]#</td>
|
||||
<td class="small" align="right">#[usedEURL]#</td>
|
||||
<td class="small" align="right"><input name="ramCacheEURL" type="text" align="right" size="8" maxlength="9" value="#[ramCacheEURL]#"> bytes</td>
|
||||
<td class="small" align="right">#[goodEURL]#</td>
|
||||
<td class="small" align="right">#[bestEURL]#</td>
|
||||
<td class="small" align="left">URLs that cannot be loaded are stored in this database. It is also used for double-checked during crawling.
|
||||
Increasing the cache size will most probably speed up crawling slightly, but not significantly.</td>
|
||||
</tr>
|
||||
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">DHT Control</td>
|
||||
<td class="small" align="right">#[chunkDHT]#</td>
|
||||
<td class="small" align="right">#[slreqDHT]#</td>
|
||||
<td class="small" align="right">#[slempDHT]#</td>
|
||||
<td class="small" align="right">#[slhigDHT]#</td>
|
||||
<td class="small" align="right">#[slmedDHT]#</td>
|
||||
<td class="small" align="right">#[sllowDHT]#</td>
|
||||
<td class="small" align="right">#[usedDHT]#</td>
|
||||
<td class="small" align="right"><input name="ramCacheDHT" type="text" align="right" size="8" maxlength="9" value="#[ramCacheDHT]#"> bytes</td>
|
||||
<td class="small" align="right">#[goodDHT]#</td>
|
||||
<td class="small" align="right">#[bestDHT]#</td>
|
||||
<td class="small" align="left">This is simply the cache for the seed-dbs (active, passive, potential).
|
||||
This cache is divided into three equal parts.
|
||||
Increasing this cache may speed up many functions, but we need to test this to see the effects.</td>
|
||||
</tr>
|
||||
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">Messages</td>
|
||||
<td class="small" align="right">#[chunkMessage]#</td>
|
||||
<td class="small" align="right">#[slreqMessage]#</td>
|
||||
<td class="small" align="right">#[slempMessage]#</td>
|
||||
<td class="small" align="right">#[slhigMessage]#</td>
|
||||
<td class="small" align="right">#[slmedMessage]#</td>
|
||||
<td class="small" align="right">#[sllowMessage]#</td>
|
||||
<td class="small" align="right">#[usedMessage]#</td>
|
||||
<td class="small" align="right"><input name="ramCacheMessage" type="text" align="right" size="8" maxlength="9" value="#[ramCacheMessage]#"> bytes</td>
|
||||
<td class="small" align="right">#[goodMessage]#</td>
|
||||
<td class="small" align="right">#[bestMessage]#</td>
|
||||
<td class="small" align="left">The Message cache for peer-to-peer messages. Less important.</td>
|
||||
</tr>
|
||||
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">Wiki</td>
|
||||
<td class="small" align="right">#[chunkWiki]#</td>
|
||||
<td class="small" align="right">#[slreqWiki]#</td>
|
||||
<td class="small" align="right">#[slempWiki]#</td>
|
||||
<td class="small" align="right">#[slhigWiki]#</td>
|
||||
<td class="small" align="right">#[slmedWiki]#</td>
|
||||
<td class="small" align="right">#[sllowWiki]#</td>
|
||||
<td class="small" align="right">#[usedWiki]#</td>
|
||||
<td class="small" align="right"><input name="ramCacheWiki" type="text" align="right" size="8" maxlength="9" value="#[ramCacheWiki]#"> bytes</td>
|
||||
<td class="small" align="right">#[goodWiki]#</td>
|
||||
<td class="small" align="right">#[bestWiki]#</td>
|
||||
<td class="small" align="left">The YaCy-Wiki uses a database to store its pages.
|
||||
This cache is divided in two parts, one for the wiki database and one for its backup.
|
||||
Increasing this cache may speed up access to the wiki pages.</td>
|
||||
</tr>
|
||||
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">News</td>
|
||||
<td class="small" align="right">#[chunkNews]#</td>
|
||||
<td class="small" align="right">#[slreqNews]#</td>
|
||||
<td class="small" align="right">#[slempNews]#</td>
|
||||
<td class="small" align="right">#[slhigNews]#</td>
|
||||
<td class="small" align="right">#[slmedNews]#</td>
|
||||
<td class="small" align="right">#[sllowNews]#</td>
|
||||
<td class="small" align="right">#[usedNews]#</td>
|
||||
<td class="small" align="right"><input name="ramCacheNews" type="text" align="right" size="8" maxlength="9" value="#[ramCacheNews]#"> bytes</td>
|
||||
<td class="small" align="right">#[goodNews]#</td>
|
||||
<td class="small" align="right">#[bestNews]#</td>
|
||||
<td class="small" align="left">The News-DB stores property-lists for news that are included in seeds.
|
||||
Increasing this cache may speed up the peer-ping.</td>
|
||||
</tr>
|
||||
|
||||
<tr class="TableCellLight">
|
||||
<td class="small" align="left" colspan="18">
|
||||
<input type="submit" name="submitcache" value="Submit New Cache Values">
|
||||
Changes take effect after re-start of YaCy</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,159 @@
|
||||
//PerformaceMemory_p.java
|
||||
//-----------------------
|
||||
//part of YaCy
|
||||
//(C) by Michael Peter Christen; mc@anomic.de
|
||||
//first published on http://www.anomic.de
|
||||
//Frankfurt, Germany, 2005
|
||||
//last major change: 19.09.2005
|
||||
//
|
||||
//This program is free software; you can redistribute it and/or modify
|
||||
//it under the terms of the GNU General Public License as published by
|
||||
//the Free Software Foundation; either version 2 of the License, or
|
||||
//(at your option) any later version.
|
||||
//
|
||||
//This program is distributed in the hope that it will be useful,
|
||||
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
//GNU General Public License for more details.
|
||||
//
|
||||
//You should have received a copy of the GNU General Public License
|
||||
//along with this program; if not, write to the Free Software
|
||||
//Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
//Using this software in any meaning (reading, learning, copying, compiling,
|
||||
//running) means that you agree that the Author(s) is (are) not responsible
|
||||
//for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
//by usage of this softare or this documentation. The usage of this software
|
||||
//is on your own risk. The installation and usage (starting/running) of this
|
||||
//software may allow other people or application to access your computer and
|
||||
//any attached devices and is highly dependent on the configuration of the
|
||||
//software which must be done by the user of the software; the author(s) is
|
||||
//(are) also not responsible for proper configuration and usage of the
|
||||
//software, even if provoked by documentation provided together with
|
||||
//the software.
|
||||
//
|
||||
//Any changes to this file according to the GPL as documented in the file
|
||||
//gpl.txt aside this file in the shipment you received can be done to the
|
||||
//lines that follows this copyright notice here, but changes must not be
|
||||
//done inside the copyright notive above. A re-distribution must contain
|
||||
//the intact and unchanged copyright notice.
|
||||
//Contributions and changes to the program code must be marked as such.
|
||||
|
||||
//You must compile this file with
|
||||
//javac -classpath .:../classes PerformanceMemory_p.java
|
||||
//if the shell's current path is HTROOT
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.io.File;
|
||||
|
||||
import de.anomic.http.httpHeader;
|
||||
import de.anomic.plasma.plasmaSwitchboard;
|
||||
import de.anomic.server.serverCore;
|
||||
import de.anomic.server.serverObjects;
|
||||
import de.anomic.server.serverSwitch;
|
||||
import de.anomic.server.serverThread;
|
||||
import de.anomic.server.serverFileUtils;
|
||||
import de.anomic.yacy.yacyCore;
|
||||
import de.anomic.yacy.yacySeedDB;
|
||||
|
||||
public class PerformanceMemory_p {
|
||||
|
||||
private static int[] slt;
|
||||
private static int req,chk,usd,bst,god;
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch sb) {
|
||||
// return variable that accumulates replacements
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) sb;
|
||||
serverObjects prop = new serverObjects();
|
||||
File defaultSettingsFile = new File(switchboard.getRootPath(), "yacy.init");
|
||||
Map defaultSettings = ((post == null) || (!(post.containsKey("submitdefault")))) ? null : serverFileUtils.loadHashMap(defaultSettingsFile);
|
||||
|
||||
if ((post != null) && (post.containsKey("submitcache"))) {
|
||||
sb.setConfig("ramCacheRWI", post.get("ramCacheRWI", "0"));
|
||||
sb.setConfig("ramCacheHTTP", post.get("ramCacheHTTP", "0"));
|
||||
sb.setConfig("ramCacheLURL", post.get("ramCacheLURL", "0"));
|
||||
sb.setConfig("ramCacheNURL", post.get("ramCacheNURL", "0"));
|
||||
sb.setConfig("ramCacheEURL", post.get("ramCacheEURL", "0"));
|
||||
sb.setConfig("ramCacheDHT", post.get("ramCacheDHT", "0"));
|
||||
sb.setConfig("ramCacheMessage", post.get("ramCacheMessage", "0"));
|
||||
sb.setConfig("ramCacheWiki", post.get("ramCacheWiki", "0"));
|
||||
sb.setConfig("ramCacheNews", post.get("ramCacheNews", "0"));
|
||||
}
|
||||
|
||||
req = switchboard.wordIndex.size();
|
||||
chk = switchboard.wordIndex.assortmentsCacheChunkSizeAvg();
|
||||
slt = switchboard.wordIndex.assortmentsCacheFillStatusCml();
|
||||
calc(); putprop(prop, "RWI");
|
||||
prop.put("ramCacheRWI", sb.getConfig("ramCacheRWI", "0"));
|
||||
|
||||
req = switchboard.cacheManager.size();
|
||||
chk = switchboard.cacheManager.dbCacheChunkSize();
|
||||
slt = switchboard.cacheManager.dbCacheFillStatus();
|
||||
calc(); putprop(prop, "HTTP");
|
||||
prop.put("ramCacheHTTP", sb.getConfig("ramCacheHTTP", "0"));
|
||||
|
||||
req = switchboard.urlPool.loadedURL.urlHashCache.size();
|
||||
chk = switchboard.urlPool.loadedURL.urlHashCache.cacheChunkSize();
|
||||
slt = switchboard.urlPool.loadedURL.urlHashCache.cacheFillStatus();
|
||||
calc(); putprop(prop, "LURL");
|
||||
prop.put("ramCacheLURL", sb.getConfig("ramCacheLURL", "0"));
|
||||
|
||||
req = switchboard.urlPool.noticeURL.urlHashCache.size();
|
||||
chk = switchboard.urlPool.noticeURL.urlHashCache.cacheChunkSize();
|
||||
slt = switchboard.urlPool.noticeURL.urlHashCache.cacheFillStatus();
|
||||
calc(); putprop(prop, "NURL");
|
||||
prop.put("ramCacheNURL", sb.getConfig("ramCacheNURL", "0"));
|
||||
|
||||
req = switchboard.urlPool.errorURL.urlHashCache.size();
|
||||
chk = switchboard.urlPool.errorURL.urlHashCache.cacheChunkSize();
|
||||
slt = switchboard.urlPool.errorURL.urlHashCache.cacheFillStatus();
|
||||
calc(); putprop(prop, "EURL");
|
||||
prop.put("ramCacheEURL", sb.getConfig("ramCacheEURL", "0"));
|
||||
|
||||
req = yacyCore.seedDB.sizeConnected() + yacyCore.seedDB.sizeDisconnected() + yacyCore.seedDB.sizePotential();
|
||||
chk = yacyCore.seedDB.dbCacheChunkSize();
|
||||
slt = yacyCore.seedDB.dbCacheFillStatus();
|
||||
calc(); putprop(prop, "DHT");
|
||||
prop.put("ramCacheDHT", sb.getConfig("ramCacheDHT", "0"));
|
||||
|
||||
req = switchboard.messageDB.size();
|
||||
chk = switchboard.messageDB.dbCacheChunkSize();
|
||||
slt = switchboard.messageDB.dbCacheFillStatus();
|
||||
calc(); putprop(prop, "Message");
|
||||
prop.put("ramCacheMessage", sb.getConfig("ramCacheMessage", "0"));
|
||||
|
||||
req = switchboard.wikiDB.sizeOfTwo();
|
||||
chk = switchboard.wikiDB.dbCacheChunkSize();
|
||||
slt = switchboard.wikiDB.dbCacheFillStatus();
|
||||
calc(); putprop(prop, "Wiki");
|
||||
prop.put("ramCacheWiki", sb.getConfig("ramCacheWiki", "0"));
|
||||
|
||||
req = yacyCore.newsPool.dbSize();
|
||||
chk = yacyCore.newsPool.dbCacheChunkSize();
|
||||
slt = yacyCore.newsPool.dbCacheFillStatus();
|
||||
calc(); putprop(prop, "News");
|
||||
prop.put("ramCacheNews", sb.getConfig("ramCacheNews", "0"));
|
||||
|
||||
// return rewrite values for templates
|
||||
return prop;
|
||||
}
|
||||
|
||||
private static void calc() {
|
||||
usd = chk * (slt[1]+slt[2]+slt[3]);
|
||||
bst = (((chk * req) >> 10) + 1) << 10;
|
||||
god = (((bst / (1+slt[1]+slt[2]+slt[3]) * slt[1]) >> 10) + 1) << 10;
|
||||
}
|
||||
|
||||
private static void putprop(serverObjects prop, String db) {
|
||||
prop.put("chunk" + db, chk);
|
||||
prop.put("slreq" + db, req);
|
||||
prop.put("slemp" + db, slt[0]);
|
||||
prop.put("slhig" + db, slt[1]);
|
||||
prop.put("slmed" + db, slt[2]);
|
||||
prop.put("sllow" + db, slt[3]);
|
||||
prop.put("used" + db, usd);
|
||||
prop.put("good" + db, god);
|
||||
prop.put("best" + db, bst);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue