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.

Continuously Rising CPU usage by Kafka streams

See original GitHub issue

This issues is related to another one raised earlier on this package: https://github.com/LGouellec/kafka-streams-dotnet/issues/43

We are making use of kafka-streams-dotnet library in a dotnet core microservices based architecture. We have noticed a peculiar behaviour where our pods running streamer applications always end up consuming 100% of CPU resources allocated to them, sometimes even when they are idling and no processing is happening.

Our question here is whether this is the intended behaviour with the streams implementation, since the stream threads are constantly polling the source topics. If not could you help us with the configurations that we have to use to optimise CPU usage.

The streams topology that we are using is :

Streamiz.kafka.net version being used : 1.1.3

Operating system : Linux (Kubernetes node)

var builder = new StreamBuilder();
            builder.Stream<string, string, StringSerDes, StringSerDes>(_streamOptions.Value.SourceTopic, _timestampExtractor)
                .MapValues((key, value) => _messageProcessor.ProcessMessage(value))
                .Filter((key, value) => CheckThis(key,value))
                .To(_streamOptions.Value.SinkTopic);

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
fglaesercommented, Jan 6, 2021

@ayush113, We are having some cpu problem also in our Openshift cluster with netcore 3.1 apps, (No related with Streamiz), we changed the CG to workstation with good results, maybe this could help you.

1reaction
ayush113commented, Jan 7, 2021

Hi @LGouellec

I will try to create a more detailed dump in an idle scenario, currently facing some problems with debug settings, will share the dump file soon.

Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimising Kafka for stream processing in latency sensitive ...
One can observe an increase in CPU consumption or increased latency but not always it can be directly linked to a specific component...
Read more >
Increasing CPU and memory usage in a Spark Structured ...
This behavior is consistent across runs. When restarting the application, CPU usage falls to the starting point and then consistently increases.
Read more >
Kafka Streams RocksDB CPU usage
Hi all, We have a Kafka Streams job which has high CPU utilization. When profiling the job, we saw that this was for...
Read more >
Our Kafka Streams Journey on Growth Center
Less CPU consumption since no need to use Kafka consumers, ... Since the data is produced continuously, it causes to increase in the...
Read more >
Kafka-Streams - Tips on How to Decrease Re-Balancing ...
In our case, processing of a single message takes around 5 milliseconds and the stream is stateless (processing - both CPU and IO...
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