X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4a321487f3d44241242a1729ab4d137df1f57bfb..dba5b2f86e3b91eade86a851932004a56b34134e:/utils/update.php diff --git a/utils/update.php b/utils/update.php index 95e99b9f..efdf6525 100755 --- a/utils/update.php +++ b/utils/update.php @@ -293,6 +293,15 @@ if ($aResult['import-osmosis'] || $aResult['import-osmosis-all']) { // Index file $sThisIndexCmd = $sCMDIndex; + if (!isset($aResult['index-instances'])) { + if (getLoadAverage() < 24) + $iIndexInstances = 2; + else + $iIndexInstances = 1; + } else + $iIndexInstances = $aResult['index-instances']; + + $sThisIndexCmd = $sCMDIndex.' -t '.$iIndexInstances; $fCMDStartTime = time(); if (!$aResult['no-index']) {