From f9216e388ca529e2b1598806ade3f256c8e71b9b Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 30 Nov 2011 21:21:16 +0000 Subject: [PATCH] - faster ping to clean up old peers faster - clean up more news git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@8125 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- defaults/yacy.init | 4 ++-- source/net/yacy/peers/NewsPool.java | 5 +++-- source/net/yacy/search/Switchboard.java | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/defaults/yacy.init b/defaults/yacy.init index e7b339808..22f6b622b 100644 --- a/defaults/yacy.init +++ b/defaults/yacy.init @@ -575,8 +575,8 @@ crawlingCountryMustMatch=AD,AL,AT,BA,BE,BG,BY,CH,CY,CZ,DE,DK,EE,ES,FI,FO,FR,GG,G 20_dhtdistribution_idlesleep=15000 20_dhtdistribution_busysleep=10000 20_dhtdistribution_memprereq=12582912 -30_peerping_idlesleep=60000 -30_peerping_busysleep=60000 +30_peerping_idlesleep=30000 +30_peerping_busysleep=30000 30_peerping_memprereq=2097152 40_peerseedcycle_idlesleep=1800000 40_peerseedcycle_busysleep=1200000 diff --git a/source/net/yacy/peers/NewsPool.java b/source/net/yacy/peers/NewsPool.java index 0c3be4a15..c75f10c14 100644 --- a/source/net/yacy/peers/NewsPool.java +++ b/source/net/yacy/peers/NewsPool.java @@ -257,7 +257,8 @@ public class NewsPool { categories.addAll(Arrays.asList(category)); } - private final static long MILLISECONDS_PER_DAY = 1000 * 60 * 60 * 24; + private final static long MILLISECONDS_PER_HOUR = 1000 * 60 * 60; + private final static long MILLISECONDS_PER_DAY = MILLISECONDS_PER_HOUR * 24; private final NewsDB newsDB; private final NewsQueue outgoingNews, publishedNews, incomingNews, processedNews; @@ -401,7 +402,7 @@ public class NewsPool { if (record == null) return false; if (record.category() == null) return true; final long created = record.created().getTime(); - if ((System.currentTimeMillis() - created) > (1L * MILLISECONDS_PER_DAY)) { + if ((System.currentTimeMillis() - created) > (6L * MILLISECONDS_PER_HOUR)) { // remove everything after 1 day return true; } diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index 56d472bce..4ed478ed6 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -777,7 +777,7 @@ public final class Switchboard extends serverSwitch { SwitchboardConstants.PEER_PING_METHOD_START, SwitchboardConstants.PEER_PING_METHOD_JOBCOUNT, SwitchboardConstants.PEER_PING_METHOD_FREEMEM, - 60000, Long.MAX_VALUE, 60000, Long.MAX_VALUE), + 30000, Long.MAX_VALUE, 30000, Long.MAX_VALUE), 2000); deployThread(SwitchboardConstants.INDEX_DIST, "DHT Distribution", "selection, transfer and deletion of index entries that are not searched on your peer, but on others", null, new InstantBusyThread(