Open Sourabh721992 opened 6 years ago
the code looks fine... what throughput are we talking about?
what platform (windows or linux?). if windows, it would be interesting to know if you are able to run the same program on linux (dotnet core) with less CPU?
Finally, you could try this CI build of Confluent.Kafka that uses a more recent build of librdkafka: https://www.nuget.org/packages/Confluent.Kafka/0.11.3-ci-303
Hi,
The CPU percentage should be close to 0 -1 percent.
I am running the same on the Windows machine and Sorry, didn't have Linux platform.
I have tried with the 0.11.2-ci-303 but in vain. Still the consumption is in random double digits like 12, 64, 19, 27, 43.
Hi,
We have the same high CPU utilisation. We host our Kafka consumers in a local Service Fabric cluster in full .NET.
One of the clusters works fine and has the expected 1-2% CPU usage when going in the loop. The Kafka cluster is not secure.
The other clusters have the same hardware and show a 30-40% CPU spike when looping (same code deployed). The Kafka clusters are secure though. Running the same code on my development Service Fabric cluster communicating with the secure Kafka cluster shows the expected 1-2% blip when going into the loop.
From time to time the services drive the Service Fabric cluster to 100% CPU. When that happens the cluster can't respond anymore and we have to restart the Kafka consumer services.
I'm not sure how to move forward and isolate the issue.
Cheers.
It is hard to give any specific advice on this, try to locate what part of the runtime is consuming the CPU by running a CPU profiler, or configure the client with something like "debug", "broker,topic,msg"
unfortunately, it looks like #1870 referenced above didn't make it into 0.11.5. The next step is to test with a custom build when that gets merged to master.
I am using version 0.11.3 and have made four threads for each consumer (4 consumers are there) that are subscribing to the same Topic and same group (so 1 Consumer group).
I have witness random CPU consumption and have random numbers like 0, 3, 19, 64 etc and most of the time the consumption is in double figures.
PFB the code and request you to suggest the fix.
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using Confluent.Kafka; using Confluent.Kafka.Serialization;
namespace AxesKafkaConsumer { class Program { static dynamic config; static void Main(string[] args) {
region KafkaConsumerConfiguration
}
How to reproduce
Checklist
Please provide the following information: