RU:Osm2pgsql/benchmarks

From OpenStreetMap Wiki
Jump to: navigation, search
В процессе перевода +/-
Эта страница находится в процессе перевода или помечена для этой цели, поэтому может содержать пропуски, ошибки и непереведённые фрагменты. Исходная статья – Osm2pgsql/benchmarks.
Если вы знаете английский, то можете помочь нам, переведя часть оригинальной статьи. Общие сведения о переводе статей на русский язык можно найти здесь.

Вы можете закончить перевод

Help
Доступные языки
English Русский

Contents

Введение

Бенчмарки osm2pgsql необходимы пользователям для сравнения, поскольку импорт данных OSM сильно зависит от конфигурации аппаратного и программного обеспечения. Импорт всей планеты может длиться дни даже на мощной десктопной машине. Импорт части файла планеты занимает сравнительно меньше времени, и, при возможности, должен быть использован вместо импорта планеты целиком.

Что влияет на длительность импорта?

Примерный список факторов, которые влияют на время, занимаемое импортом.

Пример вывода

Следующий пример показывает вывод osm2pgsql при импорте файла планеты. Команда time в linux, используемая в этом примере, фиксирует время, в течение которого работала osm2pgsql. Обратите внимание, что строки NOTICE нормальны при импорте в пустую базу данных.

~/osm2pgsql$ time osm2pgsql -s -v -U mapper -S ./default.style -d gis -C 3000 ../planet/planet-100324.osm.bz2
osm2pgsql SVN version 0.69-20672
 
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point" does not exist, skipping
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
Setting up table: planet_osm_line
NOTICE:  table "planet_osm_line" does not exist, skipping
NOTICE:  table "planet_osm_line_tmp" does not exist, skipping
Setting up table: planet_osm_polygon
NOTICE:  table "planet_osm_polygon" does not exist, skipping
NOTICE:  table "planet_osm_polygon_tmp" does not exist, skipping
Setting up table: planet_osm_roads
NOTICE:  table "planet_osm_roads" does not exist, skipping
NOTICE:  table "planet_osm_roads_tmp" does not exist, skipping
Mid: pgsql, scale=100, cache=3000MB, maxblocks=384001*8192
Setting up table: planet_osm_nodes
NOTICE:  table "planet_osm_nodes" does not exist, skipping
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_nodes_pkey" for table "planet_osm_nodes"
Setting up table: planet_osm_ways
NOTICE:  table "planet_osm_ways" does not exist, skipping
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_ways_pkey" for table "planet_osm_ways"
Setting up table: planet_osm_rels
NOTICE:  table "planet_osm_rels" does not exist, skipping
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_rels_pkey" for table "planet_osm_rels"
 
Reading in file: ../planet/planet-100324.osm.bz2
Processing: Node(574797k) Way(43465k) Relation(87k)
excepton caught processing way id=110802
 
excepton caught processing way id=110803
Processing: Node(574797k) Way(43465k) Relation(465k)
Node stats: total(574797076), max(673005476)
Way stats: total(43465572), max(53189409)
Relation stats: total(465800), max(533629)
 
Going over pending ways
processing way (12179k)
 
Going over pending relations
 
node cache: stored: 386841238(67.30%), storage efficiency: 98.38%, hit rate: 65.63%
Committing transaction for planet_osm_roads
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_line
Sorting data and creating indexes for planet_osm_polygon
Sorting data and creating indexes for planet_osm_roads
Sorting data and creating indexes for planet_osm_line
Committing transaction for planet_osm_point
Sorting data and creating indexes for planet_osm_point
Completed planet_osm_point
Completed planet_osm_roads
Completed planet_osm_polygon
Stopping table: planet_osm_nodes
Stopping table: planet_osm_rels
Stopping table: planet_osm_ways
Building index on table: planet_osm_rels
Stopped table: planet_osm_nodes
Building index on table: planet_osm_ways
Stopped table: planet_osm_rels
Completed planet_osm_line
Stopped table: planet_osm_ways
 
 
real	2985m27.269s
user	327m47.240s
sys	35m32.480s

Разбор и выяснение прогресса

Если вы желаете знать, насколько продвинулся импорт, посмотрите статистику, и сравните её с разделом вывода "Processing: Node". Помните, что отношения обрабатываются приблизительно в 10 раз медленнее линий (которые обрабатываются в 10 раз медленнее точек). В моем случае, точки обрабатывались со скоростью 40.8k/s, линии - 0.13k/s и отношения - ..k/s. Also, closing a table take approximately as long as importing the data. Так что если вы закончили с точками, значит около 1/6 всего импорта уже позади.

Benchmarks

List of benchmarks contributed by users. Currently simply using time command to return length of time' it takes osm2pgsql task to complete. If you do not have time available please provide some other meaningful metric. Better organization and formatting standard for this section is needed.

Planet / 8GB DKB

real	2985m27.269s
user	327m47.240s
sys	35m32.480s

Planet / 32GB rw

real    1236m30.801s
user    272m56.090s
sys     15m6.180s


sly's benchmark 05/2010 (influence of SSD, software RAID and memory on import and diffs)

Benchs :

Software are always the same : default lenny 64bits packages (postgres 8.3 and osm2pgsql from SVN of 05/2010) The osm2pgsql style file is an home made one, so hard to compare to other's benchmarks, especially it has the -x switch to import timestamp which prooved to be extremely disk unfriendly

($/home/ressource-for-osm/osm2pgsql/osm2pgsql -C 1200 -s -S ./style -G -x -m -d gis europe.osm.bz2)

($time /home/ressource-for-osm/osm2pgsql/osm2pgsql -C 400 --bbox -27,31,50,72 -e 18 -o./regeneration_old_tiles/expire_file_list -x -G -a -s -S ./default.style -m -d gis temporaire.osc)

Computer B, beside having slower storage due to RAID 1 proved itself faster, probably helped by the well handled Memory cache of the linux kernel.

DELL® PowerEdge R210

real    6419m44.318s
user    634m29.431s
sys     167m56.762s

Dedibox pro : DELL® PowerEdge R210

 real    2420m15.421s
 user    830m9.141s
 sys     19m51.334s

custom i7 system

 real    7211m6.191s
 user    595m47.626s
 sys     73m32.200s

Hetzner : Root Server EX 4

 real    10483m29.951s
 user    640m39.706s
 sys     49m43.398s
Personal tools
Namespaces
Variants
Actions
site
Toolbox