[Tile-serving] [osm2pgsql] Adjust dense block cache size (#439)
Paul Norman
notifications at github.com
Wed Aug 12 23:59:41 UTC 2015
The dense cache has an array [allocated to track blocks of nodes](https://github.com/openstreetmap/osm2pgsql/blob/5aa9a7569132f865fe1bb6d84b9272109d71f6e5/node-ram-cache.cpp#L320)
The memory usage is 2^(36-BLOCK_SHIFT) * sizeof(ramNodeBlock). ramNodeBlock is two 32-bit integers and a pointer to node storage, so is 16 bytes on modern hardware. With default BLOCK_SHIFT, this works out to 1GB of RAM.
Increasing the block size will reduce storage efficiency but also reduce overhead. Preliminary indications are that the second is more significant than the first, and memory usage is reduced with larger blocks, even for planet-sized imports.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/439
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20150812/158201fa/attachment.html>
More information about the Tile-serving
mailing list