Skip to content

chore: Add Java Flight Recorder profiling to TPC benchmarks#3597

Merged
andygrove merged 3 commits intoapache:mainfrom
andygrove:jfr-profiling
Feb 26, 2026
Merged

chore: Add Java Flight Recorder profiling to TPC benchmarks#3597
andygrove merged 3 commits intoapache:mainfrom
andygrove:jfr-profiling

Conversation

@andygrove
Copy link
Member

@andygrove andygrove commented Feb 25, 2026

Which issue does this PR close?

N/A

Rationale for this change

Make it easier to run the TPC benchmarks in the repository with JFR.

What changes are included in this PR?

  • Adds --jfr and --jfr-dir flags to run.py that enable JFR profiling for both Spark driver and executors
  • Updated README

How are these changes tested?

I tested on macOS with standalone mode and in docker-compose

@andygrove andygrove changed the title Add Java Flight Recorder profiling to TPC benchmarks chore: Add Java Flight Recorder profiling to TPC benchmarks Feb 25, 2026
@andygrove andygrove changed the title chore: Add Java Flight Recorder profiling to TPC benchmarks chore: Add Java Flight Recorder profiling to TPC benchmarks [WIP] Feb 25, 2026
Add --jfr and --jfr-dir flags to run.py for capturing JFR profiles
from Spark driver and executors. Use disk=true for reliable recordings
in Docker environments. Add stop_grace_period to worker containers
for graceful JVM shutdown.
@andygrove andygrove changed the title chore: Add Java Flight Recorder profiling to TPC benchmarks [WIP] chore: Add Java Flight Recorder profiling to TPC benchmarks Feb 25, 2026
@andygrove andygrove marked this pull request as ready for review February 25, 2026 21:35
@parthchandra
Copy link
Contributor

One thing to note when running on K8s is to make sure the executor pods are not removed by spark before you can access the jfr file.

Also for production cases, one can use the profiling feature available in Spark - https://github.com/apache/spark/tree/b3703755d80585297367d539de9fa8c5783b1c6b/connector/profiler

Copy link
Contributor

@parthchandra parthchandra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a minor comment, but this lgtm

@andygrove
Copy link
Member Author

One thing to note when running on K8s is to make sure the executor pods are not removed by spark before you can access the jfr file.

Thanks. I started a draft PR to add k8s support to these scripts, so will add this there.

Also for production cases, one can use the profiling feature available in Spark - https://github.com/apache/spark/tree/b3703755d80585297367d539de9fa8c5783b1c6b/connector/profiler

I will look at this too.

@andygrove andygrove merged commit 68b2c4d into apache:main Feb 26, 2026
3 checks passed
@andygrove andygrove deleted the jfr-profiling branch February 26, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants