- the maxMemory-fix for the Sun JVM 1.4.2 wrongly also applied to 1.6, thx to NN

- added logging of reducing word-cache (log-level fine)
- disabled memprereq field in PerformanceQueues_p.html, because it is now set by the collections db
- minor changes to ConfigSkins / -Language

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3165 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
karlchenofhell 18 years ago
parent 735c1f87b1
commit 0336480a3e

@ -13,7 +13,7 @@
</p>
<form action="ConfigLanguage_p.html">
<fieldset>
<dl class="pairs">
<dl>
<dt><label for="cur_lang">Current language</label>:</dt>
<dd id="cur_lang"><!-- lang -->default(english)&nbsp;</dd>
@ -29,9 +29,11 @@
<option value="#[file]#">#[name]#</option>#{/langlist}#
</select>
</dd>
<dd>
<input type="submit" name="use_button" value="Use" />
<input type="submit" name="delete" value="Delete" />
</dd>
</dl>
<input type="submit" name="use_button" value="Use" />
<input type="submit" name="delete" value="Delete" />
</fieldset>
</form>
@ -47,8 +49,8 @@
<dd>
<input type="checkbox" name="use_lang" id="use_lang" value="on" checked="checked" />
</dd>
<dd><input type="submit" value="Install" /></dd>
</dl>
<input type="submit" value="Install" />
</fieldset>
</form>
#(status)#

@ -14,19 +14,21 @@
<form action="ConfigSkins_p.html">
<fieldset>
<dl class="pairs">
<dl>
<dt><label for="cur_skin">Current skin</label>:</dt>
<dd id="cur_skin">#[currentskin]#&nbsp;</dd>
<dt><label for="skins">Available Skins</label>:</dt>
<dd>
<select id="skins" size="10" name="skin">#{skinlist}#
<select id="skins" name="skin">#{skinlist}#
<option value="#[file]#">#[name]#</option>#{/skinlist}#
</select>
</dd>
<dd>
<input type="submit" name="use_button" value="Use" />
<input type="submit" name="delete" value="Delete" />
</dd>
</dl>
<input type="submit" name="use_button" value="Use" />
<input type="submit" name="delete" value="Delete" />
</fieldset>
</form>
@ -38,8 +40,8 @@
<dt><label for="use_url">Use this skin</label></dt>
<dd><input type="checkbox" name="use_skin" id="use_url" value="on" checked="checked" /></dd>
<dd><input type="submit" value="install" /></dd>
</dl>
<input type="submit" value="install" />
</fieldset>
</form>
#(status)#

@ -51,7 +51,7 @@
<td align="right">#[memusepercycle]#</td>
<td align="right"><input name="#[threadname]#_idlesleep" size="7" maxlength="7" value="#[idlesleep]#" /> milliseconds</td>
<td align="right"><input name="#[threadname]#_busysleep" size="7" maxlength="7" value="#[busysleep]#" /> milliseconds</td>
<td align="right"><input name="#[threadname]#_memprereq" size="5" maxlength="5" value="#[memprereq]#" /> kbytes</td>
<td align="right"><input name="#[threadname]#_memprereq" size="5" maxlength="5" value="#[memprereq]#"#(disabled)#:: disabled="disabled"#(/disabled)# /> kbytes</td>
<td align="left">#[longdescr]#</td>
</tr>
#{/table}#

@ -165,7 +165,8 @@ public class PerformanceQueues_p {
prop.put("table_" + c + "_idlesleep", idlesleep);
prop.put("table_" + c + "_busysleep", busysleep);
prop.put("table_" + c + "_memprereq", memprereq / 1024);
// disallow setting of memprereq for indexer to prevent db from throwing OOMs
prop.put("table_" + c + "_disabled", (threadName.contains("_indexing")) ? 1 : 0);
c++;
}
prop.put("table", c);

@ -248,7 +248,7 @@ public abstract class serverAbstractThread extends Thread implements serverThrea
logSystem("thread '" + this.getName() + "' deployed, " + ((this.busyPause < 0) ? "starting job." : "starting loop."));
}
long timestamp;
long memstamp0, memstamp1;
long memstamp0, memstamp1, memnow;
boolean isBusy;
//Runtime rt = Runtime.getRuntime();
@ -271,7 +271,7 @@ public abstract class serverAbstractThread extends Thread implements serverThrea
timestamp = System.currentTimeMillis();
ratz(this.idlePause);
idletime += System.currentTimeMillis() - timestamp;
} else if (serverMemory.available() > memprereq) try {
} else if ((memnow = serverMemory.available()) > memprereq) try {
// do job
timestamp = System.currentTimeMillis();
memstamp0 = serverMemory.used();
@ -304,6 +304,8 @@ public abstract class serverAbstractThread extends Thread implements serverThrea
this.jobExceptionHandler(e);
busyCycles++;
} else {
log.logFine("Thread '" + this.getName() + "' runs short memory cycle. Free mem: " +
(memnow / 1024) + " KB, needed: " + (memprereq / 1024) + " KB");
// omit job, not enough memory
// process scheduled pause
timestamp = System.currentTimeMillis();

@ -49,8 +49,8 @@ import java.text.DecimalFormat;
public class serverMemory {
public static boolean vm15 = System.getProperty("java.vm.version").startsWith("1.5");
public static final long max = (vm15) ? Runtime.getRuntime().maxMemory() : computedMaxMemory(); // patch for maxMemory bug in Java 1.4.2
public static boolean vm14 = System.getProperty("java.vm.version").startsWith("1.4");
public static final long max = (vm14) ? computedMaxMemory() : Runtime.getRuntime().maxMemory() ; // patch for maxMemory bug in Java 1.4.2
private static final Runtime runtime = Runtime.getRuntime();
public static long free() {

Loading…
Cancel
Save