Tune Kubernetes Worker Nodes for Production

To get the best performance from your hardware, set Redpanda to production mode on each worker node and run the autotuner tool. The autotuner identifies the hardware configuration on your worker node and optimizes the Linux kernel to give you the best performance.

Prerequisites

Make sure that your current Linux user has root privileges. The autotuner requires privileged access to the Linux kernel settings.

Make sure that your Linux kernel is at least version 3.10.0-514 or 4.18.

Install Redpanda

To run the autotuner, you need to install the Redpanda binary on each worker node.

  • Fedora/RedHat

  • Debian/Ubuntu

== Run the setup script to download and install the repo
curl -1sLf 'https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.rpm.sh' | sudo -E bash && \
== Use yum to install redpanda
sudo yum install redpanda -y
== Run the setup script to download and install the repo
curl -1sLf 'https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh' | sudo -E bash && \
== Use apt to install redpanda
sudo apt install redpanda -y

Run the autotuner

Run the autotuner on each worker node that runs a Redpanda broker.

  1. Set Redpanda to production mode:

    sudo rpk redpanda mode production
  2. Run the autotuner:

    sudo rpk redpanda tune all

Changes to the Linux kernel are not persisted. If a worker node restarts, make sure to run sudo rpk redpanda tune all on it again.

You can use a privileged DaemonSet to schedule the autotuner on each worker node that runs a Redpanda broker. Apply taints to Nodes that successfully complete the autotuner command. Use tolerations on your Pods so that they are scheduled only on tuned worker nodes.

For details about the autotuner, including how to enable or disable an individual tuner, see the rpk redpanda tune command reference.