mirror of
https://github.com/yacy/yacy_search_server.git
synced 2025-05-17 22:49:33 -04:00
Add setting for DHT receive loadprereq insted of hardcoded load < 2.0
This commit is contained in:
parent
4c603e23f0
commit
dfb2b79609
@ -691,6 +691,7 @@ collection=user
|
||||
20_dhtdistribution_busysleep=15000
|
||||
20_dhtdistribution_memprereq=12582912
|
||||
20_dhtdistribution_loadprereq=2.0
|
||||
20_dhtreceive_loadprereq=2.0
|
||||
30_peerping_idlesleep=30000
|
||||
30_peerping_busysleep=30000
|
||||
30_peerping_memprereq=2097152
|
||||
|
@ -102,7 +102,8 @@ public final class transferRWI {
|
||||
return prop;
|
||||
}
|
||||
// load tests
|
||||
if (Memory.getSystemLoadAverage() > 2.0 || MemoryControl.shortStatus()) {
|
||||
final float maxReceiveLoad = sb.getConfigFloat(SwitchboardConstants.INDEX_RECEIVE_LOADPREREQ, 2.0f);
|
||||
if (Memory.getSystemLoadAverage() > maxReceiveLoad || MemoryControl.shortStatus()) {
|
||||
// check also Protocol.metadataRetrievalRunning.get() > 0 ?
|
||||
result = "too high load"; // don't tell too much details
|
||||
prop.put("result", result);
|
||||
|
@ -82,6 +82,7 @@ public final class SwitchboardConstants {
|
||||
public static final String INDEX_DIST_LOADPREREQ = "20_dhtdistribution_loadprereq";
|
||||
public static final String INDEX_DIST_IDLESLEEP = "20_dhtdistribution_idlesleep";
|
||||
public static final String INDEX_DIST_BUSYSLEEP = "20_dhtdistribution_busysleep";
|
||||
public static final String INDEX_RECEIVE_LOADPREREQ = "20_dhtreceive_loadprereq";
|
||||
// 30_peerping
|
||||
/**
|
||||
* <p><code>public static final String <strong>PEER_PING</strong> = "30_peerping"</code></p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user