Bird
0
0

You have set log.segment.bytes=10485760 but Kafka still creates very small log segments. What is the most likely cause?

medium📝 Debug Q14 of 15
Kafka - Performance Tuning
You have set log.segment.bytes=10485760 but Kafka still creates very small log segments. What is the most likely cause?
AThe <code>log.roll.ms</code> setting causes segments to roll before reaching the size limit.
BThe <code>num.io.threads</code> is too low.
CThe <code>log.dirs</code> path is incorrect.
DKafka does not support segment size configuration.
Step-by-Step Solution
Solution:
  1. Step 1: Understand segment rolling behavior

    Kafka rolls log segments based on size or time. If log.roll.ms is set low, segments roll by time before reaching the size limit.
  2. Step 2: Evaluate other options

    Low num.io.threads affects performance but not segment size. Incorrect log.dirs causes errors but not small segments. Kafka supports segment size configuration.
  3. Final Answer:

    The log.roll.ms setting causes segments to roll before reaching the size limit. -> Option A
  4. Quick Check:

    Segment rolling time overrides size limit [OK]
Quick Trick: Check log.roll.ms if segments are smaller than expected [OK]
Common Mistakes:
  • Blaming I/O threads for segment size
  • Ignoring time-based rolling settings
  • Assuming Kafka ignores segment size config

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes