Bird
0
0

A Kafka producer is configured with batch.size=16384 and linger.ms=100, but throughput is still low. What is a likely misconfiguration?

medium📝 Debug Q7 of 15
Kafka - Performance Tuning
A Kafka producer is configured with batch.size=16384 and linger.ms=100, but throughput is still low. What is a likely misconfiguration?
Abuffer.memory is too small, limiting batch buffering
Backs is set to 1, causing too many retries
Ccompression.type is set to snappy, which slows down producer
Dmax.in.flight.requests.per.connection is set to 10, causing blocking
Step-by-Step Solution
Solution:
  1. Step 1: Understand buffer.memory role

    buffer.memory limits total memory for buffering messages before sending; too small value restricts batch building.
  2. Step 2: Evaluate other options

    acks=1 is normal, snappy compression is fast, and max.in.flight.requests.per.connection=10 usually improves throughput.
  3. Final Answer:

    buffer.memory is too small, limiting batch buffering -> Option A
  4. Quick Check:

    buffer.memory limits batch buffering [OK]
Quick Trick: buffer.memory must be large enough for batches [OK]
Common Mistakes:
  • Blaming acks=1 for retries
  • Assuming snappy compression slows producer
  • Thinking max.in.flight.requests causes blocking

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes