X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e1be3d9f48b51a927c26d1ac0035b50b82423916..35df2bb75eae78f38b347f26862fa4cb8284d574:/utils/update.php?ds=sidebyside 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']) {