question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Java client: high CPU regression for producer between 2.6.x and 2.7.x

See original GitHub issue

Describe 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:

  1. Run the example dropwizard application at https://github.com/klevy-toast/dropwizard-pulsar-test/
  2. Run ./while.sh to trigger continuous message production
  3. Observe average CPU over time
  4. 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. image

Desktop (please complete the following information):

  • OS: linux

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
eolivellicommented, Jan 7, 2022

Can you test your suggestion on current master branch? If you get good results please send a PR

0reactions
michaeljmarshallcommented, Feb 9, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found