> 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

How to allow the Agents to auto-tune settings

## 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
