Producer Sender Metrics : request-size-avg does not scale with # of partitions

I am running the performance test with the below configurations

  • batch.size = 16,384. (default batch size)
  • No. of partitions = 3

In the metrics, I see that

  • request-size-avg=16285.006 (same as batch size)

With the # of partitions being 3, I would expect it to be 16,384 * 3 = 49,152 bytes.

What could be the reason behind this behavior? Does kafka further optimize batching that is not very transparent when it comes to batching?

I see the same behavior where the request-size-avg is same as batch.size even when I increase or decrease the batch size from the default number.

Thanks.

1 Like