[Tile-serving] [openstreetmap/osm2pgsql] Default value for `--cache` (#1501)

Jochen Topf notifications at github.com
Thu Jun 29 08:13:50 UTC 2023


A few notes on this:
* The `--cache/-C` setting has been ignored in non-slim mode for a while. The ram middle stores everything in memory anyway, an extra cache doesn't help, just hurts. TODO: Add warning when running osm2pgsql in that case that cache setting is ignored.
* For the slim mode, the cache should not be used together with a flat-node file. In this case the cache should simply be disabled automatically. The Linux page cache will do the caching for us. We can implement this and it should not break any installation. TODO: Disable cache and add warning when running osm2pgsql in that case that cache setting is ignored.
* So the cache setting only makes sense for the slim mode without flat-node file.

We don't know how much memory a system has and, even if we find out, we don't know how much of that is needed elsewhere. So I don't think it is a good idea to set this automatically. We could maybe add some warnings though: "Your cache setting seems quite large for the amount of memory you have." or so. But we do need some guidelines the in the manual that tell users what a sensible cache value could be.

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

Message ID: <openstreetmap/osm2pgsql/issues/1501/1612606194 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230629/89ab0f8b/attachment.htm>


More information about the Tile-serving mailing list