[Tile-serving] [osm2pgsql-dev/osm2pgsql] Suggestion: middle-pgsql stats for hit/miss (#1323)

Sarah Hoffmann notifications at github.com
Thu Jul 17 13:25:08 UTC 2025


lonvia left a comment (osm2pgsql-dev/osm2pgsql#1323)

We've removed the statistics in question in the meantime as its usefulness was limited in general. So I'm going to close this issue.

> The difference between a db access for 1 node vs 10 nodes is low, but 0 nodes vs 1 nodes is large. Effectively this means a 90% hit rate is a 0% hit rate, making the stats less meaningful.

This observation is correct, when node locations are stored in the database. If you are using flat node store, then the coast of cache miss is directly proportional to the number of missed nodes.

The numbers you computed might be indeed interesting from a developer point of view to make decisions on what are good defaults. For users the only really interesting number would be the percentage of nodes that could be stored in the cache. The hit/miss rate will be very closely tidy to that. Eventually, if will be easier for users to just follow the  [advice on cache size](https://osm2pgsql.org/doc/manual.html#caching) in the manual, than looking at the cache usage statistics. That's why we dropped the stats when renovating the code.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/issues/1323#issuecomment-3084064677
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/issues/1323/3084064677 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20250717/493700fe/attachment.htm>


More information about the Tile-serving mailing list