A thread dump is a snapshot of all the threads running in a java process. It’s a vital artifact to troubleshoot various production problems such as CPU spikes, unresponsiveness in the application, poor response time, hung threads, high memory consumption. Thus to facilitate troubleshooting, we have seen enterprises capture thread dumps on a periodic basis (every 5 minute or 2 minute). So we were curious to learn the overhead of capturing thread dump on a periodic basis. Thus we set out to conduct the below case study.
Environment
For our study we chose to use the open source spring boot pet clinic application. Pet Clinic is a poster child application that was developed to demonstrate the spring boot framework features.
We ran this application in OpenJDK 11. We deployed this application on the Amazon AWS t2.medium EC2 instance which has 16GB RAM and 2 CPUs. Test was orchestrated using Apache JMeter stress testing tool. We used AWS Cloudwatch to measure the CPU, Memory utilization. In nutshell here are the tools/technologies, we used to conduct this case study:
- OpenJDK 11
- AWS EC2
- AWS Cloudwatch
- Apache JMeter
Test Scenario
In this environment, we conducted 3 tests:
- Baseline Test – In this scenario we ran the pet clinic application without capture thread dumps using the JMeter tool for 20 minutes with 200 concurrent users
- Thread dumps every 5 minutes Test – In this scenario we ran the pet clinic application using the same JMeter script for 20 minutes with 200 concurrent users. However we captured thread dump from a pet clinic application every 5 minutes.
- Thread dumps every 2 minutes Test – In this scenario we ran the pet clinic application using the same JMeter script for 20 minutes with 200 concurrent users. However we captured thread dump from a pet clinic application every 2 minutes.
Note: If you don’t know how to capture thread dump, here’s 9 options that will teach you to capture thread dumps.
Test Results
We captured average CPU and memory utilization from the AWS Cloudwatch and average response time and throughput from the JMeter tool. Data collected from all the test scenarios are summarized in the below table.
| Data collected | Baseline test | Every 5 minutes test | Every 2 minutes test |
| Avg CPU Usage | 8.35% | 10.40% | 7.92% |
| Avg Memory Usage | 20.80% | 19.90% | 19.60% |
| Avg Response Time | 3901 ms | 3888 ms | 3770 ms |
| Avg Throughput | 24.4/sec | 25.8/sec | 24.8/sec |
As you can see there is no noticeable difference in the CPU and Memory consumption. Similarly there is no noticeable difference in the average response and transaction throughput.
Conclusion
Thus based on our study we can conclude that there is no noticeable overhead in capturing thread dumps on a 5 minutes or 2 minutes interval.



July 9, 2025 at 7:23 am
This is a useful and well-executed study! The results clearly show that taking thread dumps every 2-5 minutes has negligible impact on CPU, memory, or performance—great news for debugging in production. A longer test duration or different JVM versions could be interesting follow-up, but the findings are reassuring for DevOps teams. Thanks for sharing!
July 9, 2025 at 11:17 am
I need to order software and several applications for our veterinary clinic, tell me where I can order such services and how much it will cost for a budget organization. Software is needed, possibly new, or maybe it will be enough to update the old software. What would you advise on this issue.
July 9, 2025 at 12:22 pm
These services are now provided by every second company and many individual software specialists. You just need to find such a reliable company, because you need software development for a specific separate industry – veterinary medicine. I think there will be no problems with the search.
July 12, 2025 at 3:05 pm
That’s a great point—finding the right team for veterinary-specific software is really important, especially for a clinic with a limited budget. I’m also researching this area and came across a company that seems to specialize in tailored IT solutions for veterinary practices. If you’re still looking, you might want to check out how they develop software development for vets
. They cover everything from updating legacy systems to building custom applications from scratch, and seem to understand the specific needs of the veterinary field.
July 12, 2025 at 9:46 pm
Many thanks for the previous comment, it was just what I was looking for, a page that offers me a professional veterinary software development service. Thanks for the comment with the recommendation. I have already contacted the company and the truth is that it is wonderful. I eagerly await their completed work. I am sure they are great.
July 12, 2025 at 10:00 pm
I’m not looking for this, but it just so happens that my brother is. I’m so glad to come across comments like yours. It’s exactly what my brother was looking for, so I thank you too. Although my brother hasn’t hired the service yet, when he does, I’ll come back and comment here about how it went and if the service is really good or not, based on my brother’s experience. Okay?