# rpk redpanda tune

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [streaming-full.txt](https://docs.redpanda.com/streaming-full.txt)

---
title: rpk redpanda tune
latest-operator-version: v26.1.4
# EOL = End-of-Life (support lifecycle status)
page-is-nearing-eol: "false"
page-is-past-eol: "true"
page-eol-date: December 22, 2024
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
docname: rpk/rpk-redpanda/rpk-redpanda-tune
page-component-name: streaming
page-version: "23.3"
page-component-version: "23.3"
page-component-title: Streaming
page-relative-src-path: rpk/rpk-redpanda/rpk-redpanda-tune.adoc
page-edit-url: https://github.com/redpanda-data/docs/edit/v/23.3/modules/reference/pages/rpk/rpk-redpanda/rpk-redpanda-tune.adoc
page-git-created-date: "2023-05-17"
page-git-modified-date: "2024-09-27"
support-status: past end-of-life
---

<!-- Source: https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-redpanda/rpk-redpanda-tune.md -->

> ❗ **IMPORTANT**
>
> This command is not supported on macOS, Windows.

> ⚠️ **WARNING**
>
> Do not use this command in Azure self-managed environments.

`rpk redpanda tune`, also referred to as the autotuner, identifies the hardware configuration on your machine and optimizes the Linux kernel to give you the best performance for running Redpanda.

Available tuners:

-   all

-   disk\_irq

-   disk\_scheduler

-   disk\_nomerges

-   disk\_write\_cache

-   fstrim

-   net

-   aio\_events

-   swappiness

-   ballast\_file

-   cpu

-   clocksource

-   transparent\_hugepages

-   coredump


To learn more about a tuner, run [`rpk redpanda tune help <tuner name>`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-redpanda/rpk-redpanda-tune-help/).

> ❗ **IMPORTANT**
>
> You should run the autotuner as part of the production deployment workflow. Redpanda recommends you first follow a guide for production deployment:
>
> -   [Deploy for Production](https://docs.redpanda.com/streaming/23.3/deploy/deployment-option/self-hosted/manual/production/production-deployment/)
>
> -   [Tune Kubernetes Worker Nodes for Production](https://docs.redpanda.com/streaming/23.3/deploy/deployment-option/self-hosted/kubernetes/k-tune-workers/)
>
>
> While you follow the guides, consult this reference for details about the autotuner.

## [](#usage)Usage

```bash
rpk redpanda tune <list of elements to tune> [command] [flags]
```

> 💡 **TIP**
>
> -   When running `rpk redpanda tune`, make sure that your current Linux user has root privileges. The autotuner requires privileged access to the Linux kernel settings.
>
> -   To run `rpk redpanda tune all` on a Redpanda broker automatically after broker or host restarts, configure the service `redpanda-tuner`, which runs `rpk redpanda tune all`, to run at boot-up:
>
>     -   For RHEL, after installing the rpm package, run `systemctl` to both start and enable the `redpanda-tuner` service:
>
>         ```bash
>         sudo systemctl start redpanda-tuner
>         sudo systemctl enable redpanda-tuner
>         ```
>
>     -   For Ubuntu, after installing the apt package, run `systemctl` to start the `redpanda-tuner` service (which is already enabled):
>
>         ```bash
>         sudo systemctl start redpanda-tuner
>         ```

## [](#flags)Flags

| Value | Type | Description |
| --- | --- | --- |
| --cpu-set | string | Set of CPUs for tuners to use in cpuset(7) format; if not specified, tuners will use all available CPUs (default "all"). |
| -r, --dirs | strings | List of data directories or places to store data (e.g. /var/vectorized/redpanda/); usually your XFS file system on an NVMe SSD device. |
| -d, --disks | strings | Lists of devices to tune f.e. 'sda1'. |
| -h, --help | - | Help for tune. |
| -m, --mode | string | Operation Mode: one of: [sq, sq_split, mq]. |
| -n, --nic | strings | Network Interface Controllers to tune. |
| --output-script | string | If a filename is provided, it will generate a tuning file that can later be used to tune the system. |
| --reboot-allowed | - | Allow tuners to tune boot parameters and request system reboot. |
| --timeout | duration | The maximum time to wait for the tune processes to complete (e.g. 300ms, 1.5s, 2h45m) (default 10s). |
| --config | string | Redpanda or rpk config file; default search paths are /var/lib/redpanda/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml. |
| -X, --config-opt | stringArray | Override rpk configuration settings. See rpk -X or execute rpk -X help for inline detail or rpk -X list for terser detail. |
| --profile | string | Profile to use. See rpk profile for more details. |
| -v, --verbose | - | Enable verbose logging. |

## [](#examples)Examples

This section provides examples of using the autotuner.

-   To enable a predetermined set of tuners for production, run the [`rpk redpanda mode prod`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-redpanda/rpk-redpanda-mode/) command. This command modifies settings in the `redpanda.yaml` configuration file.

-   To list the available tuners and to see whether they’re enabled or supported (and a reason for if they’re unsupported), run the [`rpk redpanda tune list`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-redpanda/rpk-redpanda-tune-list/) command.

-   To enable or disable a tuner, run the [`rpk redpanda config set`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-redpanda/rpk-redpanda-config-set/), as the tuner flags are configurable node properties.

    -   Each tuner has a YAML key flag for enabling/disabling itself in `redpanda.yaml`. Most are formed by prepending `rpk.tune_` to the name of the tuner listed by [`rpk redpanda tune list`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-redpanda/rpk-redpanda-tune-list/). See the [Tuners reference](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-redpanda/rpk-redpanda-tune-list/#tuners) for the exact key for a tuner. For an example of enabling a tuner, the key for the `aio_events` tuner is `rpk.tune_aio_events`, and it can be enabled with the following command:

        ```bash
        rpk redpanda config set rpk.tune_aio_events true
        ```


-   To run all available tuners, use the [`rpk redpanda tune`](./) command for `all`:

    ```bash
    rpk redpanda tune all
    ```

-   To run a specific tuner, use the [`rpk redpanda tune`](./) command for the tuner:

    ```bash
    rpk redpanda tune <tuner>
    ```

-   To learn more about a tuner, use the [`rpk redpanda tune help`](./) command for the tuner:

    ```bash
    rpk redpanda tune help <tuner>
    ```

    See also the [Tuners reference](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-redpanda/rpk-redpanda-tune-list/#tuners) for descriptions about each tuner.


* * *

### [](#related-topics)Related topics

-   [Deploy for Production](https://docs.redpanda.com/streaming/23.3/deploy/deployment-option/self-hosted/manual/production/production-deployment/)

-   [Tune Kubernetes Worker Nodes for Production](https://docs.redpanda.com/streaming/23.3/deploy/deployment-option/self-hosted/kubernetes/k-tune-workers/)

-   [`rpk redpanda mode production`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-redpanda/rpk-redpanda-mode/)

-   [`rpk redpanda tune list`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-redpanda/rpk-redpanda-tune-list/)