mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-25 14:02:12 +03:00
limit default threads to 15
When no explicit number of threads is given, don't simply use getProcessorCount()-1, but limit to max. 15
This commit is contained in:
parent
0d341c256b
commit
8139a079f8
@ -61,8 +61,8 @@ if ($aCMDResult['import-data'] || $aCMDResult['all']) {
|
||||
}
|
||||
|
||||
|
||||
// This is a pretty hard core default - the number of processors in the box - 1
|
||||
$iInstances = isset($aCMDResult['threads'])?$aCMDResult['threads']:(getProcessorCount()-1);
|
||||
// by default, use all but one processor, but never more than 15.
|
||||
$iInstances = isset($aCMDResult['threads'])?$aCMDResult['threads']:(min(16,getProcessorCount())-1);
|
||||
if ($iInstances < 1) {
|
||||
$iInstances = 1;
|
||||
warn("resetting threads to $iInstances");
|
||||
|
Loading…
Reference in New Issue
Block a user