Java client: high CPU regression for producer between 2.6.x and 2.7.x
See original GitHub issueDescribe the bug When upgrading our pulsar client to 2.7.x, we noticed significantly higher CPU used for applications running multiple produces with the newer version. We have been unable to isolate the exact cause of the regression.
To Reproduce Steps to reproduce the behavior:
- Run the example dropwizard application at https://github.com/klevy-toast/dropwizard-pulsar-test/
- Run
./while.sh
to trigger continuous message production - Observe average CPU over time
- Change pulsar version in
pom.xml
, repeat 1-3
Expected behavior CPU usage should be fairly similar between versions. But something in 2.7.x is clearly using more resources.
Screenshots I tested this by running the application on an AWS t3a.large EC2 instance – there was a ~15% increase in CPU.
Desktop (please complete the following information):
- OS: linux
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
How to fix high Java CPU usage problems - TheServerSide.com
One of the first indicators of a runtime performance problem is a high Java CPU usage report from a JVM profiler or Java...
Read more >High CPU load when PulsarClient (Java) is idle #6414 - GitHub
Run a simple producer subscribing to a topic with no messages, or run the above simple JUnit test. Observe CPU usage. Expected behavior....
Read more >High CPU utilization in Spring Cloud Loadbalancer application
The problem occurs only in redeploy operation. I replace - from shell - the war with the new version. OS: RedHat 7.6 x86_64...
Read more >Can mutli-threading java client cause high CPU utilization of ...
Potentially - yes. Especially on a totally underscaled database server. I would expect problems with 1000 connections, not with something as ...
Read more >High CPU issue during rebalance in Kafka consumer after ...
We have several consumer threads consuming from different partitions during the rebalance. This is reproducible in both the new ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you test your suggestion on current master branch? If you get good results please send a PR
I think that https://github.com/apache/pulsar/pull/14185 might prove to be an even more optimal solution, especially when running with many producers that are not in user. I haven’t completed any bench marks yet, though.