From fe3eb40e3a8c6721fc2438d6b9484753ac79753a Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 29 Aug 2015 13:14:11 +0200 Subject: [PATCH] disable multithreading in osm2pgsql not really useful for gazetteer plugin and producing too much overhead --- utils/setup.php | 2 +- utils/update.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/setup.php b/utils/setup.php index 14fe675e..782665d7 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -200,7 +200,7 @@ $osm2pgsql .= ' --tablespace-main-data '.CONST_Tablespace_Place_Data; if (CONST_Tablespace_Place_Index) $osm2pgsql .= ' --tablespace-main-index '.CONST_Tablespace_Place_Index; - $osm2pgsql .= ' -lsc -O gazetteer --hstore'; + $osm2pgsql .= ' -lsc -O gazetteer --hstore --number-processes 1'; $osm2pgsql .= ' -C '.$iCacheMemory; $osm2pgsql .= ' -P '.$aDSNInfo['port']; $osm2pgsql .= ' -d '.$aDSNInfo['database'].' '.$aCMDResult['osm-file']; diff --git a/utils/update.php b/utils/update.php index c5fc14a6..13790450 100755 --- a/utils/update.php +++ b/utils/update.php @@ -83,7 +83,7 @@ $iCacheMemory = getCacheMemoryMB(); echo "WARNING: resetting cache memory to $iCacheMemory\n"; } - $sOsm2pgsqlCmd = CONST_Osm2pgsql_Binary.' -klas -C '.$iCacheMemory.' -O gazetteer -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port']; + $sOsm2pgsqlCmd = CONST_Osm2pgsql_Binary.' -klas --number-processes 1 -C '.$iCacheMemory.' -O gazetteer -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port']; if (!is_null(CONST_Osm2pgsql_Flatnode_File)) { $sOsm2pgsqlCmd .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File; -- 2.39.5