How to find the root cause of high CPU usage of Kafka brokers?

后端 未结 1 2176
感动是毒
感动是毒 2021-02-20 07:06

I am in charge of operating two kafka clusters (one for prod and one for our dev environment). The setup is mostly similiar, but the dev environment has no SASL/SSL setup and us

相关标签:
1条回答
  • 2021-02-20 07:44

    If you have access to JMX metrics you are almost done for profiling CPU. All thing have to do is installing Prometheus and Grafana and then store metrics in Prometheus and monitor them with Grafana. You can find complete steps in Monitoring Kafka

    Note: If you are suspicious about snappy compression, maybe this performance test can help you

    Update:

    Based on Confluent, most of the CPU usage is because of SSL.

    Note that if SSL is enabled, the CPU requirements can be significantly higher (the exact details depend on the CPU type and JVM implementation).

    You should choose a modern processor with multiple cores. Common clusters utilize 24 core machines.

    If you need to choose between faster CPUs or more cores, choose more cores. The extra concurrency that multiple cores offers will far outweigh a slightly faster clock speed.

    0 讨论(0)
提交回复
热议问题