tencent cloud

피드백

Conducting Production and Consumption Pressure Testing on CKafka

마지막 업데이트 시간:2024-01-09 15:02:47

    Testing Tool

    The open-source script of the Kafka client can be used for Kafka producer and consumer performance testing. Test results are displayed mainly based on the size of messages sent per second (MB/second) and the number of messages sent per second (records/second).
    Kafka producer test script: $KAFKA_HOME/bin/kafka-producer-perf-test.sh
    Kafka consumer test script: $KAFKA_HOME/bin/kafka-consumer-perf-test.sh

    Testing Command

    Note:
    The ckafka vip:vport in the following sample commands should be replaced by the actual IP and port assigned for your instance.
    Sample command for production testing:
    bin/kafka-producer-perf-test.sh
    --topic test
    --num-records 123
    --record-size 1000
    --producer-props bootstrap.servers= ckafka vip : port
    --throughput 20000
    Sample command for consumption testing:
    bin/kafka-consumer-perf-test.sh
    --topic test
    --new-consumer
    --fetch-size 10000
    --messages 1000
    --broker-list bootstrap.servers=ckafka vip : port

    Suggestions

    We recommend you create three or more partitions to increase throughput. This is because there must be at least three CKafka cluster nodes at the backend. If only one partition is created, it will be distributed in a single broker, which will affect CKafka performance.
    As messages in each CKafka partition are ordered, the production performance will be affected if there are too many partitions. We recommend you create up to six partitions.
    It is necessary to simulate concurrency with multiple clients to ensure the testing effect. We recommend you use multiple test servers as the pressure test clients (producers) and start multiple pressure test programs on each test server to increase concurrency. To avoid the high load of test servers, you are also recommended to start one producer every second rather than all producers simultaneously.
    문의하기

    고객의 업무에 전용 서비스를 제공해드립니다.

    기술 지원

    더 많은 도움이 필요하시면, 티켓을 통해 연락 바랍니다. 티켓 서비스는 연중무휴 24시간 제공됩니다.

    연중무휴 24시간 전화 지원