Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

configuration of proxy idle time in performance menue

orbiterb9d18d40cb26
diff --git a/build.properties b/build.properties
index 2bbb2dcf9..9f79b035f 100644
--- a/build.properties
+++ b/build.properties
@@ -3,7 +3,7 @@ javacSource=1.4
javacTarget=1.4
# Release Configuration
-releaseVersion=0.39
+releaseVersion=0.391
#releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
#releaseDir=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}
diff --git a/doc/News.html b/doc/News.html
index 9590dd3f3..916007041 100644
--- a/doc/News.html
+++ b/doc/News.html
@@ -43,21 +43,14 @@ globalheader();
</ul>
-->
-<!--
-<br><p>v0.391_20050726_424 (bugfix release)
+<br><p>v0.391_20050726_436 (bugfix release)
<ul>
+<li>Fixed name-entry bug on Settings-page</li>
<li>Fixed division by zero on IndexCreate-page</li>
<li>Forcing delays of at least 100 milliseconds on Performance-page to prevent DoS behavior</li>
<li>Fixed release number display</li>
-<li>Fixed name-entry bug on Settings-page</li>
-<li></li>
-<li></li>
-<li></li>
-<li></li>
-<li></li>
-<li></li>
+<li>Proxy-Caution-Delay (forced idle time of the crawler after a proxy access) is now configurable in the Performance menue</li>
</ul>
--->
<br><p>v0.39_20050722_424
<ul>
diff --git a/htroot/Network.html b/htroot/Network.html
index 6393dcae9..84b0bc393 100644
--- a/htroot/Network.html
+++ b/htroot/Network.html
@@ -46,7 +46,7 @@
<td class="small">Hash<br>&nbsp;</td>
#(/complete)#
<td class="small">Type<br>&nbsp;</td>
-<td class="small">Version<br>Rel/SVN<br>&nbsp;</td>
+<td class="small">Release/<br>SVN<br>&nbsp;</td>
<td class="small">Contact<br>&nbsp;</td>
<td class="small">Last Seen<br>&nbsp;&nbsp;<a href="/Network.html?page=#[page]#&sort=LastSeen&order=up">&lt;</a>&nbsp;<a href="/Network.html?page=#[page]#&sort=LastSeen&order=down">&gt;</a></td>
<td class="small">Uptime<br>&nbsp;&nbsp;<a href="/Network.html?page=#[page]#&sort=Uptime&order=up">&lt;</a>&nbsp;<a href="/Network.html?page=#[page]#&sort=Uptime&order=down">&gt;</a></td>
diff --git a/htroot/Performance_p.html b/htroot/Performance_p.html
index 441baf827..1fff74127 100644
--- a/htroot/Performance_p.html
+++ b/htroot/Performance_p.html
@@ -147,6 +147,28 @@ Changes take effect immediately</td>
</table>
</p>
+<p>
+<div class=small><b>Proxy Performance Settings:</b></div>
+<form action="Performance_p.html" method="post" enctype="multipart/form-data">
+<table border="0" cellpadding="5" cellspacing="1" width="100%">
+ <tr valign="top" class="TableCellDark">
+ <td class=small>Online Caution Delay (milliseconds):</td>
+ <td class=small><input name="onlineCautionDelay" type="text" size="20" maxlength="100" value="#[onlineCautionDelay]#"></td>
+ <td class=small>
+ This is the time that the crawler idles when the proxy is accessed. The delay is extended by this time
+ each time the proxy is accessed afterwards. This shall improve performance of the proxy throughput.
+ (current delta is #[onlineCautionDelayCurrent]# milliseconds since last proxy access.)
+ </td>
+ </tr>
+ <tr valign="top" class="TableCellLight">
+ <td class=small colspan="3">
+ <input type="submit" name="proxyControlSubmit" value="Enter New Parameters">
+ Changes take effect immediately</td>
+ </tr>
+</table>
+</form>
+</p>
+
#[footer]#
</body>
</html>
diff --git a/htroot/Performance_p.java b/htroot/Performance_p.java
index 67b01fcc4..5daa79d33 100644
--- a/htroot/Performance_p.java
+++ b/htroot/Performance_p.java
@@ -204,11 +204,18 @@ public class Performance_p {
((serverCore)httpd).setPoolConfig(httpdPoolConfig);
}
+ if ((post != null) && (post.containsKey("proxyControlSubmit"))) {
+ int onlineCautionDelay = Integer.parseInt((String) post.get("onlineCautionDelay", "30000"));
+ switchboard.setConfig("onlineCautionDelay", "" + onlineCautionDelay);
+ }
+
// table cache settings
prop.put("wordCacheRAMSize", switchboard.wordIndex.wordCacheRAMSize());
prop.put("maxURLinWordCache", "" + switchboard.wordIndex.maxURLinWordCache());
prop.put("maxWaitingWordFlush", switchboard.getConfig("maxWaitingWordFlush", "180"));
prop.put("wordCacheMax", switchboard.getConfig("wordCacheMax", "10000"));
+ prop.put("onlineCautionDelay", switchboard.getConfig("onlineCautionDelay", "30000"));
+ prop.put("onlineCautionDelayCurrent", System.currentTimeMillis() - switchboard.proxyLastAccess);
int[] asizes = switchboard.wordIndex.assortmentSizes();
for (int i = 0; i < asizes.length; i += 8) {
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 21165146e..78360dcf0 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -210,7 +210,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
remoteProxyHost = null;
remoteProxyPort = 0;
}
- proxyLastAccess = 0;
+ proxyLastAccess = System.currentTimeMillis() - 60000;
if (!(listsPath.exists())) listsPath.mkdirs();
@@ -406,7 +406,11 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
}
public boolean onlineCaution() {
- return System.currentTimeMillis() - proxyLastAccess < 30000;
+ try {
+ return System.currentTimeMillis() - proxyLastAccess < Integer.parseInt(getConfig("onlineCautionDelay", "30000"));
+ } catch (NumberFormatException e) {
+ return false;
+ }
}
private static String ppRamString(int bytes) {
diff --git a/source/yacy.java b/source/yacy.java
index 79fc3e302..16f7d9ddd 100644
--- a/source/yacy.java
+++ b/source/yacy.java
@@ -112,7 +112,7 @@ public final class yacy {
// static objects
private static String vString = "@REPL_VERSION@";
- private static double version = (double) 0.1;
+ private static float version = (float) 0.1;
private static final String vDATE = "@REPL_DATE@";
private static final String copyright = "[ YACY Proxy v" + vString + ", build " + vDATE + " by Michael Christen / www.yacy.net ]";
@@ -120,19 +120,23 @@ public final class yacy {
public static String combinedVersionString2PrettyString(String s) {
long svn;
- try {svn = (long) ((double) 10000000 * Double.parseDouble(s));} catch (NumberFormatException ee) {svn = 1000000;}
- double version = (Math.floor((double) svn / (double) 10000) / (double) 1000);
- svn = svn % 10000;
- return ((version < 0.11) ? "dev" : "" + version) + "/" + ((svn == 0) ? "000" : ("" + svn));
+ try {svn = (long) (100000000.0 * Double.parseDouble(s));} catch (NumberFormatException ee) {svn = 0;}
+ double version = (Math.floor((double) svn / (double) 100000) / (double) 1000);
+ String vStr = (version < 0.11) ? "dev" : "" + version;
+ //while (vStr.length() < 5) vStr = vStr + "0";
+ svn = svn % 100000;
+ if (svn > 4000) svn=svn / 10; // fix a previous bug online
+ String svnStr = "" + svn;
+ while (svnStr.length() < 5) svnStr = "0" + svnStr;
+ return vStr + "/" + svnStr;
}
- public static double versvn2combinedVersionString(double version, int svn) {
- return version + (((double) svn) / 10000000.0);
+ public static float versvn2combinedVersion(float version, int svn) {
+ return (float) (((double) version * 100000000.0 + ((double) svn)) / 100000000.0);
}
private static void startup(String homePath) {
long startup = yacyCore.universalTime();
- try {version = Double.parseDouble(vString);} catch (NumberFormatException e) {version = (double) 0.1;}
try {
// start up
System.out.println(copyright);
@@ -189,7 +193,8 @@ public final class yacy {
if (matcher.find()) {
String svrReleaseNr = matcher.group(1);
try {
- version = versvn2combinedVersionString(version, Integer.parseInt(svrReleaseNr));
+ try {version = Float.parseFloat(vString);} catch (NumberFormatException e) {version = (float) 0.1;}
+ version = versvn2combinedVersion(version, Integer.parseInt(svrReleaseNr));
} catch (NumberFormatException e) {}
sb.setConfig("svnRevision", svrReleaseNr);
}
diff --git a/yacy.init b/yacy.init
index 937a8fc37..8d1a8011f 100644
--- a/yacy.init
+++ b/yacy.init
@@ -491,11 +491,11 @@ portForwardingHostPort=22
portForwardingHostUser=
portForwardingHostPwd=
-
-
-# Specifies if yacy should forward received messages via
+# msgForwarding: Specifies if yacy should forward received messages via
# email to the configured email address
msgForwardingEnabled=false
msgForwardingCmd=/usr/sbin/sendmail -t
msgForwardingTo=root@localhost
+#onlineCautionDelay: delay time after proxy usage before crawling is resumed
+onlineCautionDelay=30000