Ever since #491, #492, `tile_handler_serve`'s 1 megabyte buffer has been zero filled and pulled from a fresh pool with its own allocator, destroyed after every request. This means every tile request is going to fault in and zero 256 fresh pages of memory. This contends significantly under multithreaded load on the mmap lock. I have a test setup that mirrors tile.osm.org as well as I can (full planet, replaying tile requests, event MPM, 64 threads per child, HTTPS enabled, 28% of requests are If-None-Match conditional). Apache's CPU time per tile is decreased from 755 micros to 134 micro with this PR, which allocates the buffer from the request pool without zeroing it out. This matches the behavior of v0.8.1 which used plain malloc. The 134 micro time now matches v0.8.1 again. You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/mod_tile/pull/517 -- Commit Summary -- * read tiles into an unzeroed buffer from the request pool -- File Changes -- M src/mod_tile.c (8) -- Patch Links -- https://github.com/openstreetmap/mod_tile/pull/517.patch https://github.com/openstreetmap/mod_tile/pull/517.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/mod_tile/pull/517 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/mod_tile/pull/[email protected]>
_______________________________________________ Tile-serving mailing list [email protected] https://lists.openstreetmap.org/listinfo/tile-serving
