Make maximum number of words in DHT-In cache configurable at runtime

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2652 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
hermens 19 years ago
parent 625c2ce6b1
commit d8fde14c3a

@ -120,8 +120,11 @@
</tr>
<tr valign="top" class="TableCellDark">
<td>Maximum number of words in cache:</td>
<td colspan="2">
<input name="wordCacheMaxCount" type="text" size="20" maxlength="100" value="#[wordCacheMaxCount]#" />
<td>
<input name="wordOutCacheMaxCount" type="text" size="10" maxlength="100" value="#[wordOutCacheMaxCount]#" />
</td>
<td>
<input name="wordInCacheMaxCount" type="text" size="10" maxlength="100" value="#[wordInCacheMaxCount]#" />
</td>
<td>
This is is the number of word indexes that shall be held in the
@ -131,9 +134,10 @@
</tr>
<tr valign="top" class="TableCellDark">
<td>Initial space of words in cache:</td>
<td colspan="2">
<input name="wordCacheInitCount" type="text" size="20" maxlength="100" value="#[wordCacheInitCount]#" />
<td>
<input name="wordCacheInitCount" type="text" size="10" maxlength="100" value="#[wordCacheInitCount]#" />
</td>
<td>-</td>
<td>
This is is the init size of space for words in cache.
</td>

@ -171,9 +171,13 @@ public class PerformanceQueues_p {
prop.put("table", c);
if ((post != null) && (post.containsKey("cacheSizeSubmit"))) {
int wordCacheMaxCount = post.getInt("wordCacheMaxCount", 20000);
switchboard.setConfig("wordCacheMaxCount", Integer.toString(wordCacheMaxCount));
switchboard.wordIndex.setMaxWordCount(wordCacheMaxCount);
int wordOutCacheMaxCount = post.getInt("wordOutCacheMaxCount", 20000);
switchboard.setConfig("wordCacheMaxCount", Integer.toString(wordOutCacheMaxCount));
switchboard.wordIndex.setMaxWordCount(wordOutCacheMaxCount);
int wordInCacheMaxCount = post.getInt("wordInCacheMaxCount", 1000);
switchboard.setConfig("indexDistribution.dhtReceiptLimit", Integer.toString(wordInCacheMaxCount));
switchboard.wordIndex.setInMaxWordCount(wordInCacheMaxCount);
int wordCacheInitCount = post.getInt("wordCacheInitCount", 30000);
switchboard.setConfig("wordCacheInitCount", Integer.toString(wordCacheInitCount));
@ -268,7 +272,8 @@ public class PerformanceQueues_p {
prop.put("minAgeOfWCache", "" + (switchboard.wordIndex.minAgeOfDHTOutCache() / 1000 / 60)); // minutes
prop.put("minAgeOfKCache", "" + (switchboard.wordIndex.minAgeOfDHTInCache() / 1000 / 60)); // minutes
prop.put("maxWaitingWordFlush", switchboard.getConfig("maxWaitingWordFlush", "180"));
prop.put("wordCacheMaxCount", switchboard.getConfigLong("wordCacheMaxCount", 20000));
prop.put("wordOutCacheMaxCount", switchboard.getConfigLong("wordCacheMaxCount", 20000));
prop.put("wordInCacheMaxCount", switchboard.getConfigLong("indexDistribution.dhtReceiptLimit", 1000));
prop.put("wordCacheInitCount", switchboard.getConfigLong("wordCacheInitCount", 30000));
prop.put("wordFlushIdleDivisor", switchboard.getConfigLong("wordFlushIdleDivisor", 420));
prop.put("wordFlushBusyDivisor", switchboard.getConfigLong("wordFlushBusyDivisor", 5000));

Loading…
Cancel
Save