2015-10-19 96 views
1

我已经在我的本地centOS 6.6机器上安装了nominatim,下面是wiki.guide那里http://wiki.openstreetmap.org/wiki/Nominatim/Installation 我按照指令一行行,我设法导入一个小地图(monaco-latest.osm.pbf )和一切都很好。现在,我试图导入欧洲地图(15.8 GB),我遵循相同的程序,我Nominatim欧洲地图索引/导入

./utils/setup.php --osm-file european.latest.osm.pbf --all --osm2pgsql-cache 2048 2>&1 | tee setup.log 

3天前启动命令,如果我启动命令PS -aux |更我看到下面的输出nominatim/Postgres的过程:

500  25306 0.0 0.0 230024 528 ?  S Oct14 0:00 /usr/bin/php -C 
q ./utils/setup.php --osm-file /srv/mappe/europe-latest.osm.pbf --all --osm2pgsq l-cache 2048 
postgres 25310 0.0 0.0 509284 2792 ?  Ss Oct14 0:00 postgres: mapserver nominatim [local] idle 
500  25336 2.6 51.3 3908808 2015768 ?  R Oct14 182:24 /srv/Nominatim-2.3.1/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 2048 -P 5432 -d nominatim /srv/mappe/europe-latest.osm.pbf 
postgres 25338 0.7 3.6 352208 142580 ?  Ss Oct14 49:17 postgres: mapserver nominatim [local] COPY 
postgres 25339 39.3 3.5 325964 141056 ?  Rs Oct14 2726:28 postgres: mapserver nominatim [local] idle in transaction 
postgres 25340 0.2 3.5 326520 141116 ?  Ss Oct14 16:17 postgres: mapserver nominatim [local] COPY 
postgres 25341 0.0 0.0 325808 3156 ?  Ss Oct14 0:00 postgres: mapserver nominatim [local] COPY 

如果我启动命令:

psql -d postgres -c "select * from pg_stat_activity where datname = 'nominatim'" 

我看到一些日志,但是,这让我担心很多事情,如果我写后续代码:

su - postgres 
\connect nominatim 
\dt 

我看到的只是9表...

我有什么 去做??该过程仍在运行?被卡住了?

我试图安装欧洲地图在一台机器在CentOS 6.7和250GB的磁盘空间4GB内存

请帮助我。 非常感谢

嗨阿图尔和非常感谢您的回应。 现在,阅读你的文章我很确定这个过程是忙碌的,因为setup.log自4天以来一样.. 一个重要的问题:即使我的机器RAM是osm2pgsql-cache 4GB??我已经读过缓存应该是机器RAM的一半,比如果我有4GB内存缓存应该是2048.是否正确? 比现在我试图在另一台机器上安装地图,具有500 GB高清和16 GB RAM(是一个centos 6.6虚拟机)。 当我启动地图导入时,我将标准输出和错误重定向到两个不同的文件: 在setup.log中,我可以看到一些创建表和一些插入(文件大约100行),并且在文件底部IMPORT 比我读error.log文件,我看到这样的输出:

NOTICE: table "place" does not exist, skipping 
NOTICE: type "keyvalue" does not exist, skipping 
NOTICE: type "wordscore" does not exist, skipping 
NOTICE: type "stringlanguagetype" does not exist, skipping 
NOTICE: type "keyvaluetype" does not exist, skipping 
NOTICE: function get_connected_ways(pg_catalog.int4[]) does not exist, skipping 
Allocating memory for dense node cache 
Allocating dense node cache in one big chunk 
Allocating memory for sparse node cache 
Sharing dense sparse Node-cache: cache=2048MB, maxblocks=262144*8192, allocation method=11 Mid: pgsql, scale=10000000 cache=2048 
Setting up table: planet_osm_nodes 
NOTICE: table "planet_osm_nodes" does not exist, skipping 
Setting up table: planet_osm_ways 
NOTICE: table "planet_osm_ways" does not exist, skipping 
Setting up table: planet_osm_rels 
NOTICE: table "planet_osm_rels" does not exist, skipping 
Reading in file: /srv/mappe/europe-latest.osm.pbf 
Processing: Node(10k 10.0k/s) Way(0k 0.00k/s) Relation(0 0.00/s) 
Processing: Node(20k 20.0k/s) Way(0k 0.00k/s) Relation(0 0.00/s) 
... 

等等..是我第三次尝试安装这个该死的地图,已经是第三次了过程停在:

Processing: Node(1561860k 141.1k/s) Way(6002k 0.04k/s) Relation(0 0.00/s) 

恰恰在这一点上,过程停了下来,两次我看到一个错误或类似于'gazzetter错误执行外部命令'和另一次没有错误出现,并且该过程刚刚停止。 为什么这个场景?为什么这个过程恰恰停在那一点? 请帮我做了很多谷歌搜索,但我什么也没找到。 感谢

回答

1

您应该检查SETUP.LOG如果有类似内容的增长:

Done 930027 in 17491 @ 53.171745 per second - Rank 30 ETA (seconds): 1053255.375000 

这意味着,进口任务处理930027个元素17491秒这给每秒53.171745对象,所以估计时间是1053255秒。

你有30个等级,据我记得26和30是最大的。

如果您想加快速度,可以尝试使用编写于Nominatim installation guide PG Tuning section中的PG性能设置。

我看到你给的缓存osm2pgsql进程相当低。尝试使用18000

您还可以通过添加--threads n选项来并行处理此操作。其中n是线程数量。默认值是CPU数量 - 1

如果everythink工作正常但速度很慢,可能是某处存在瓶颈(磁盘IO操作,内存不足或者CPU可能会变慢)。

我最后一次进口欧洲在i7/32GB RAM/7200硬盘上花费了大约10天的时间,所以不要期望它立即工作。

+0

我知道你没有足够的代表,但是当你有这个答案属于评论...现在我们很高兴你尝试帮助。转换成答案指示如果SO卡住了,可以如何查看setup.log –