[Tile-serving] [osm2pgsql] Reduce memory usage of node cache (#360)

Sarah Hoffmann notifications at github.com
Tue Jun 16 20:24:41 UTC 2015


Reduces preallocation of memory and implements more dense management structures for the ram node cache. For a planet import, the reduction in total memory is around 800MB. This helps a bit with #351 but won't completely fix it.

Passes the tests but still needs to be tested more thoroughly with different variations of ram cache configuration before merging.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/360

-- Commit Summary --

  * allocate cache for flatnodes only when required
  * use a more condense structure for ramNodeBlock
  * enforce ordered nodes in sparse cache
  * restrict number of blocks in ram cache to 32bit

-- File Changes --

    M node-persistent-cache.cpp (72)
    M node-ram-cache.cpp (53)
    M node-ram-cache.hpp (21)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/360.patch
https://github.com/openstreetmap/osm2pgsql/pull/360.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/360
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20150616/ca9043d7/attachment.html>


More information about the Tile-serving mailing list