Current state: Under Discussion
Discussion thread: https://lists.apache.org/thread/fvog79tprhk4qybyfs1c0yk0v9j0wffh
JIRA:
The kafka-consumer-perf-test tool is a great tool for quickly assessing raw consumer performance. Currently, it subscribes to all partitions and provides an overview of the entire cluster's performance. However, the tool does not support testing the performance of a single broker or partition. Introducing this capability would be highly beneficial for debugging and estimating capacity and resource requirements.
In a real-world scenario, our production environment encountered an issue where a Spark Structured Streaming consumer was experiencing lag. This lag was due to some tasks taking longer to complete. Despite all tasks reading from different partitions with an equal number of records to process, the fetch-time for some partitions was noticeably higher than for others. By modifying the kafka-consumer-perf-test tool to test individual partitions, we were able to isolate the problem to a single broker with a faulty switch.
This modification provided the Hardware team with a straightforward method to conduct experiments and verify resolutions, ultimately streamlining the troubleshooting process and ensuring smoother operations.
Add following new optional parameters to kafka-consumer-perf-test:
As mentioned earlier, two new flags are introduced. When they are specified, consumer will be assigned only specified partitions and seek to provided offsets (If specified). User can specify start offsets to ensure the results are precisely comparable.
The change can be easily tested by specifying new parameters and checking metrics.
NA