1. Confluent Documentation, Producer Configs for Apache Kafka®:
batch.size: "A larger batch size will generally lead to better compression and higher throughput at the cost of more memory and higher latency." This directly supports increasing the batch size for better throughput.
compression.type: "Specify the compression type for all data generated by the producer... Compression is for the entire batch of records...". Enabling compression reduces the payload size, which is a standard technique for improving throughput.
linger.ms: "The producer will wait for up to the given delay to allow other records to be sent so that the sends can be batched together." This confirms that linger.ms is a time-based trigger, which is superseded when the size-based trigger (batch.size) is met first, as described in the question.
Source: Confluent Documentation, "Producer Configs", sections on batch.size, compression.type, and linger.ms.
2. Book: Kafka: The Definitive Guide, 2nd Edition (by Neha Narkhede, Gwen Shapira, Todd Palino)
Chapter 4: Kafka Producers: Writing Messages to Kafka: "The combination of linger.ms and batch.size are the two most important configuration parameters for controlling the producer’s throughput and latency... To increase throughput, you will want to increase both linger.ms and batch.size." (p. 78). The text further explains that when the producer is under high load (as implied by the question), batches will fill up quickly, and increasing batch.size is a key tuning parameter.
3. Confluent Developer Blog: How to Tune Your Apache Kafka Producers for High Throughput
"To achieve high throughput, you want to configure your producers to send messages in big batches. Two settings are important for this: batch.size and linger.ms... A larger batch size is generally a good thing, as it will increase throughput." This article explicitly recommends increasing batch.size for throughput. It also states, "Another way to increase throughput is to add compression," confirming the validity of enabling compression.
Source: Confluent Developer, "How to Tune Your Apache Kafka Producers for High Throughput", May 20, 2020.