One of the best ways to understand the performance characteristics of a running program is to use a profiler. Unfortunately, all profilers aren't created equal. Let's take a look at my go-to utility for profiling Java applications, the async profiler.
Additional reading:
https://rustyrazorblade.com/post/2023/2023-11-07-async-profiler/
https://github.com/async-profiler/async-profiler
Get hands on training for Apache Cassandra! https://rustyrazorblade.com/training/