|
| 1 | +# PgOSM-Flex Performance |
| 2 | + |
| 3 | +This page provides a rough guide of how PgOSM-Flex performance compares |
| 4 | +against the legacy osm2pgsql load. **This comparison is apples to oranges** but |
| 5 | +is hopefully still helpful for planning. |
| 6 | +The data loaded via PgOSM-Flex is of much higher quality than the |
| 7 | +legacy three-table load. Due to this fundamental switch, data loaded |
| 8 | +via PgOSM-Flex is ready-to-use as soon as the load is done... |
| 9 | +it does not require massive post-import cleanup! |
| 10 | + |
| 11 | +The current findings show a given region will take a few times longer using the |
| 12 | +full PgOSM-Flex (`run-all.lua`) than using the legacy method. |
| 13 | + |
| 14 | +> Note: The Flex output of osm2pgsql is currently **Experimental** |
| 15 | +and performance characteristics are likely to shift. |
| 16 | + |
| 17 | + |
| 18 | +## Versions Tested |
| 19 | + |
| 20 | +Versions used for testing: |
| 21 | + |
| 22 | +* Ubuntu 20.04 |
| 23 | +* osm2pgsql 1.4.0 |
| 24 | +* PostgreSQL 13.1 |
| 25 | +* PostGIS 3.1 |
| 26 | + |
| 27 | + |
| 28 | +## Small sub-regions |
| 29 | + |
| 30 | +Small sub-regions test the District of Columbia and Colorado subregions from |
| 31 | +Geofabrik. PBF files were downloaded from Geofabrik in early January 2021. |
| 32 | +Tested multiple machines with 64 GB RAM, multiple CPUs and fast SSDs receiving |
| 33 | +consistent results. |
| 34 | + |
| 35 | + |
| 36 | +| Sub-region | Legacy (s) | Flex Compatible (s) | PgOSM-Flex Road/Place (s) | PgOSM-Flex No-Tags (s) | PgOSM-Flex All (s) | |
| 37 | +| :--- | :-: | :-: | :-: | :-: | :-: | |
| 38 | +| District of Columbia | 6 | 10 | 6 | 21 | 28 | |
| 39 | +| Colorado | 62 | 90 | 72 | 217 | 270 | |
| 40 | + |
| 41 | + |
| 42 | +> Note: THe above timings for PgOSM-Flex loads only represent the `.lua` portion. Running the associated `.sql` script for each load is relatively fast compared to the Lua portion. |
| 43 | +
|
| 44 | + |
| 45 | +## Large regions |
| 46 | + |
| 47 | +Initial results on larger scale tests (both data and hardware) are available |
| 48 | +in [issue #12](https://github.com/rustprooflabs/pgosm-flex/issues/12). As this project |
| 49 | +matures additional performance testing results will become available. |
| 50 | + |
| 51 | +## Legacy benchmarks |
| 52 | + |
| 53 | +See the blog post |
| 54 | +[Scaling osm2pgsql: Process and costs](https://blog.rustprooflabs.com/2019/10/osm2pgsql-scaling) |
| 55 | +for a deeper look at how performance scales using various sizes of regions and hardware. |
| 56 | + |
0 commit comments