feat(core): add continuous profiling support with async-profiler#6150
Merged
bluestreak01 merged 13 commits intomasterfrom Sep 24, 2025
Merged
feat(core): add continuous profiling support with async-profiler#6150bluestreak01 merged 13 commits intomasterfrom
bluestreak01 merged 13 commits intomasterfrom
Conversation
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.
This change integrates async-profiler 4.1 with two profiling modes for QuestDB performance analysis.
Usage
Start QuestDB with profiling enabled from startup:
Profile files will be saved to ~/.questdb/profiles/ (or your configured $QDB_ROOT/profiles).
Attach profiler to an already running QuestDB instance:
Custom Profiler Parameters
Override default profiling settings:
# Continuous profiling with custom parameters $ questdb.sh start -p -- start,event=alloc,file=/tmp/custom.jfr,interval=1ms# Profile specific database instance $ questdb.sh profile -t mydb -- -e cpu -d 60 -f /tmp/mydb-profile.htmlAnalyzing Profiles
Generate CPU flame graph heatmaps from the JFR files:
$ jfrconv --cpu -o heatmap ~/.questdb/profiles/profile-1.jfr heatmap.htmlNote: jfrconv is part of the async-profiler project and is included in a QuestDB Linux x86-64 distribution under the lib/ directory.
Features
Currently implemented for the Linux x86-64 distribution only. The
libasyncProfiler.solibrary andasprof/jfrconvbinaries are included in the distribution package under thelib/directory. For other platforms you download the async profile from https://github.com/async-profiler/async-profiler/releases and copyasprofandlibasyncProfiler.sotolib/.