52 |
conf.load( new FileReader(confFile) ); |
conf.load( new FileReader(confFile) ); |
53 |
|
|
54 |
max_workers = Integer.parseInt( conf.getSafeProperty("MAX_WORKERS") ); |
max_workers = Integer.parseInt( conf.getSafeProperty("MAX_WORKERS") ); |
55 |
|
if (max_workers <= 0) { |
56 |
|
logger.info("!!! AUTO-DETECT MAX_WORKERS !!!"); |
57 |
|
int cores = Runtime.getRuntime().availableProcessors(); |
58 |
|
cores -= 1;//Efterlad 1 core/cpu i reserve til systemet |
59 |
|
|
60 |
|
max_workers = Math.max(1, cores); //Dog skal der som minimum være 1 core til beregning |
61 |
|
|
62 |
|
} |
63 |
logger.info("Starting with MAX_WORKERS:" + max_workers); |
logger.info("Starting with MAX_WORKERS:" + max_workers); |
64 |
|
|
65 |
|
|
66 |
verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") ); |
verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") ); |
67 |
logger.info("Starting with VERBOSE:" + verbose); |
logger.info("Starting with VERBOSE:" + verbose); |
68 |
|
|