Kafka consumers are using high CPU with latest 2.0.2 release
See original GitHub issueWhile using the latest version 2.0.2, we have observed heavy CPU usage that fluctuates between 100% to 20% during the consumer poll()/heartbeat operations. This is observed especially when the there are zero events polled from the topic (events are caught up). The issue could be due to this [fix] (https://github.com/dpkp/kafka-python/issues/1985) as we were able to confirm that 2.0.1 is working fine. It appears this issue is happening with the gevent
based consumers.
cc: @dpkp @huangcuiyang
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top Results From Across the Web
Documentation - Apache Kafka
The Connector API allows building and running reusable producers or consumers that connect Kafka topics to existing applications or data systems.
Read more >Tail Latency at Scale with Apache Kafka - Confluent
The figure below shows how latencies observed by Kafka clients, usually called producer latency and consumer latency, relate to end-to-end ...
Read more >Changelog — kafka-python 2.0.2-dev documentation
This release includes breaking changes for any application code that has not migrated from older Simple-style classes to newer Kafka-style classes. Deprecation¶.
Read more >CPU Usage | Kafka Documentation - Instaclustr
If your CPU Usage is consistently high you may need to increase the capacity of your cluster. This can be achieved by either...
Read more >What is new in Apache Kafka 2.0 - Cloudera Documentation
Kafka clients are now notified of throttling before any throttling is applied when quotas are enabled. This enables clients to distinguish between network ......
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 Free
Top 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
same issue here, any idea?
In my case the issue seems to be linked to using poll(xxx) where xxx is a positive number of ms. If instead I use poll(), therefore with a 0 timeout and then call time.sleep(xxx/1000) , then I do not observe any longer a high cpu usage.