# Automatic Fetch Size Auto-tuning

## Auto-tuning consumer settings to optimize fetch throughput

WarpStream differs from tradition Kafka in a couple ways

1. WarpStream has higher latency.
2. Agents interpret fetch limits in terms of [uncompressed bytes](/warpstream/kafka/reference/compression.md#difference-with-kafka-for-fetch-requests) instead of compressed bytes like Kafka does.

As such, sometimes customers need to tune their consumer setting to achieve better performance when migrating to WarpStream. To reduce the amount of manual tuning, the Agents automatically adjust the settings related to the amount of data to be returned in a fetch request on your behalf.

In most cases, this is fine, but in some cases it can lead to excessive memory usage in the consumer clients. To disable this feature at the Agent level, use the `-autoTuneFetchLimits=false` flag or set the environment variable `WARPSTREAM_AUTO_TUNE_FETCH_LIMITS=FALSE` .

Separately, you can also disable this feature on a per-client basis by adding the `ws_dfat=true` [client ID feature](/warpstream/kafka/configure-kafka-client/configuring-kafka-client-id-features.md#warpstream_disable_fetch_auto_tune) to your clients.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.warpstream.com/warpstream/kafka/configure-kafka-client/client-configuration-auto-tuning.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
