- Performance can be scaled + DHT-profile - names for pool-threads - some small refactorings git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4923 6c8d7289-2bf4-0310-a012-ef5d649a1542pull/1/head
parent
da4b1b5c0d
commit
68c38c2d34
@ -1,51 +0,0 @@
|
||||
###
|
||||
### YaCy Init File with background performance-settings
|
||||
###
|
||||
# current: 3 times of yacy.init
|
||||
|
||||
# performance-settings
|
||||
# delay-times for permanent loops (milliseconds)
|
||||
# the idlesleep is the pause that an proces sleeps if the last call to the
|
||||
# process job was without execution of anything;
|
||||
# the busysleep is the pause after a full job execution
|
||||
# the prereq-value is a memory pre-requisite: that much bytes must
|
||||
# be available/free in the heap; othervise the loop is not executed
|
||||
# and another idlesleep is performed
|
||||
20_dhtdistribution_idlesleep=90000
|
||||
20_dhtdistribution_busysleep=30000
|
||||
20_dhtdistribution_memprereq=6291456
|
||||
30_peerping_idlesleep=360000
|
||||
30_peerping_busysleep=360000
|
||||
30_peerping_memprereq=1048576
|
||||
40_peerseedcycle_idlesleep=5400000
|
||||
40_peerseedcycle_busysleep=3600000
|
||||
40_peerseedcycle_memprereq=2097152
|
||||
50_localcrawl_idlesleep=6000
|
||||
50_localcrawl_busysleep=150
|
||||
50_localcrawl_busysleep__pro=3
|
||||
50_localcrawl_memprereq=4194304
|
||||
50_localcrawl_isPaused=false
|
||||
60_remotecrawlloader_idlesleep=180000
|
||||
60_remotecrawlloader_idlesleep__pro=30000
|
||||
60_remotecrawlloader_busysleep=120000
|
||||
60_remotecrawlloader_busysleep__pro=6000
|
||||
60_remotecrawlloader_memprereq=2097152
|
||||
60_remotecrawlloader_isPaused=false
|
||||
62_remotetriggeredcrawl_idlesleep=30000
|
||||
62_remotetriggeredcrawl_busysleep=3000
|
||||
62_remotetriggeredcrawl_memprereq=6291456
|
||||
62_remotetriggeredcrawl_isPaused=false
|
||||
70_cachemanager_idlesleep=3000
|
||||
70_cachemanager_busysleep=3
|
||||
70_cachemanager_memprereq=1048576
|
||||
80_indexing_idlesleep=3000
|
||||
80_indexing_busysleep=30
|
||||
80_indexing_busysleep__pro=3
|
||||
80_indexing_memprereq=6291456
|
||||
82_crawlstack_idlesleep=15000
|
||||
82_crawlstack_busysleep=3
|
||||
82_crawlstack_memprereq=1048576
|
||||
90_cleanup_idlesleep=900000
|
||||
90_cleanup_busysleep=900000
|
||||
90_cleanup_memprereq=0
|
||||
|
@ -0,0 +1,69 @@
|
||||
// NamePrefixThreadFactory.java
|
||||
// (C) 2008 by Daniel Raap; danielr@users.berlios.de
|
||||
// first published 13.06.2008 on http://yacy.net
|
||||
//
|
||||
// This is a part of YaCy, a peer-to-peer based web search engine
|
||||
//
|
||||
// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $
|
||||
// $LastChangedRevision: 4558 $
|
||||
// $LastChangedBy: orbiter $
|
||||
//
|
||||
// LICENSE
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
package de.anomic.server;
|
||||
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
public /**
|
||||
* creates threads whose names begin with a specified prefix for identifing purpose
|
||||
*
|
||||
* @author daniel
|
||||
*/
|
||||
class NamePrefixThreadFactory implements ThreadFactory {
|
||||
|
||||
/**
|
||||
* default as backend
|
||||
*/
|
||||
private final static ThreadFactory defaultFactory = Executors.defaultThreadFactory();
|
||||
|
||||
/**
|
||||
* pefix of each threadname
|
||||
*/
|
||||
private final String prefix;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*
|
||||
* @param prefix each thread is named 'prefix' + defaultName
|
||||
*/
|
||||
public NamePrefixThreadFactory(final String prefix) {
|
||||
this.prefix = prefix;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.util.concurrent.ThreadFactory#newThread(java.lang.Runnable)
|
||||
*/
|
||||
public Thread newThread(final Runnable r) {
|
||||
final Thread t = defaultFactory.newThread(r);
|
||||
t.setName(this.prefix + "_" + t.getName());
|
||||
return t;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue