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