rpk redpanda tune
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|
.
You should run the autotuner as part of the production deployment workflow. Redpanda recommends you first follow a guide for production deployment: While you follow the guides, consult this reference for details about the autotuner. |
Usage
rpk redpanda tune <list of elements to tune> [command] [flags]
|
Flags
Value | Type | Description |
---|---|---|
|
string |
Set of CPUs for tuners to use in cpuset(7) format; if not specified, tuners will use all available CPUs (default "all"). |
|
strings |
List of data directories or places to store data (e.g. /var/vectorized/redpanda/); usually your XFS filesystem on an NVMe SSD device. |
|
strings |
Lists of devices to tune f.e. 'sda1'. |
|
- |
Help for tune. |
|
string |
Operation Mode: one of: [sq, sq_split, mq]. |
|
strings |
Network Interface Controllers to tune. |
|
string |
Generate a tuning file that can later be used to tune the system. |
|
- |
Allow tuners to tune boot parameters and request system reboot. |
|
duration |
The maximum time to wait for the tune processes to complete (e.g. 300ms, 1.5s, 2h45m) (default 10s). |
|
string |
Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD, and /etc/redpanda/redpanda.yaml. |
|
stringArray |
Override rpk configuration settings; '-X help' for detail or '-X list' for terser detail. |
|
string |
rpk profile to use. |
|
- |
Enable verbose logging. |
Examples
This section provides examples of using the autotuner.
-
To enable a predetermined set of tuners for production, run the rpk redpanda mode prod 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 command.
-
To enable or disable a tuner, run the 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 prependingrpk.tune_
to the name of the tuner listed by rpk redpanda tune list. See the Tuners reference for the exact key for a tuner. For an example of enabling a tuner, the key for theaio_events
tuner isrpk.tune_aio_events
, and it can be enabled with the following command:rpk redpanda config set rpk.tune_aio_events true
-
-
To run all available tuners, use the rpk redpanda tune command for
all
:rpk redpanda tune all
-
To run a specific tuner, use the rpk redpanda tune command for the tuner:
rpk redpanda tune <tuner>
-
To learn more about a tuner, use the rpk redpanda tune help command for the tuner:
rpk redpanda tune help <tuner>
See also the Tuners reference for descriptions about each tuner.