> For the complete documentation index, see [llms.txt](https://docs.warpstream.com/warpstream/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.warpstream.com/warpstream/kafka/configure-kafka-client/client-configuration-auto-tuning.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
