Repository navigation
Conversation
On Linux, LD_PRELOAD=libjemalloc.so.2 made the planet 14-17% faster at 96 threads (24:43 / 23:50 -> 20:32, 7 GB less memory) and a Germany extract at 32 threads 4% faster. Documentation only; no new dependency. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gain: none in code; it documents a way to make large builds 10–17% faster on Linux without rebuilding: preloading the jemalloc allocator. No new dependency.
While profiling the tile phase on the planet, about a fifth of its CPU time went into the memory allocator (
malloc,freeand their internals). Preloading a different allocator withLD_PRELOADshowed how much of that is recoverable, without changing any code:.pmtiles48-core / 96-thread server, OpenMapTiles profile, Debian/Ubuntu
libjemalloc2. jemalloc was faster in every case and never needed more memory. For comparison, tcmalloc (gperftools 2.15) was 25% slower on the planet at 96 threads.This PR only adds a short paragraph to the "Performance and memory tuning" section of
docs/RUNNING.md. If you'd like tilemaker to use jemalloc without preloading, an optional CMake switch to link it would be a possible follow-up, but that adds a dependency, so I've left it out.🤖 Generated with Claude Code