stevekennedyuk left a comment (openstreetmap/mod_tile#509)
Thanks @hummeltech. I think the defaults are still fine, because the header and
the directives use different units:
- `RENDER_TOPUP_RATE` / `TILE_TOPUP_RATE` in `mod_tile.h` are stored as
**microseconds per request** (5000000 µs = one render every 5 s; 1000000 µs =
one tile per second). `create_tile_config()` assigns them straight to
`delaypool_render_rate` / `delaypool_tile_rate`, so they never pass through the
directive handlers or the new check.
- The directives' second argument is a **rate in requests per second**,
converted with `APR_USEC_PER_SEC / rate`. The equivalent of the default is
`ModTileThrottlingRenders 65 0.2`, which is inside the (0, 1000000] range.
`0.2` is also what `etc/apache2/renderd-example-map.conf` and
`tests/httpd.conf.in` use, so every test run already loads it.
So the only values now rejected are 0 or negative (division by zero or by
infinity) and anything above 1000000/s (which truncates to 0 µs and causes the
SIGFPE).
That said, the header comments are confusing: `TILE_TOPUP_RATE`'s comment says
"per render request", neither says the unit is microseconds, and the
`ModTileThrottlingRenders` help text talks about tiles. If it helps, I can open
a small PR that labels the macros as microseconds and makes the error messages
say "renders/tiles per second".
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/pull/509#issuecomment-6418524481
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/mod_tile/pull/509/[email protected]>
_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving