--- title: "How to Tune the Linux Kernel for Networking" slug: "kernel-tuning" updated: 2025-12-23T15:05:21Z published: 2025-12-23T15:05:21Z canonical: "docs.swxtch.io/kernel-tuning" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.swxtch.io/llms.txt > Use this file to discover all available pages before exploring further. # How to Tune the Linux Kernel for Networking **WHAT TO EXPECT** **In this article**, users will learn how to tweak the Linux kernel for increased packet rates, minimizing packet trops. **PLEASE NOTE** Kernel Tuning should be the last option when setting up and configuring the Linux xNIC for performance. We expect users to validate network loss BEFORE attempting to optimize/tune the network kernel. These settings have been found to increase packet rates and minimize packet drops. These settings are for implementing on a Linux machine running the swxtch-xNIC service. To do this: 1. **Open** the `/etc/sysctl.conf` to begin editing. 2. **Add** the following lines: ```shell net.core.rmem_default=26214400 net.core.rmem_max=26214400 ``` **PLEASE NOTE** The suggested kernel parameters above only optimize the receive buffer. If you need to increase the size of the send buffer, please contact support@swxtch.io. 1. Once the desired changes have been added to `/etc/sysctl.conf`, **save changes** and **exit**. 2. **Run** the following command to validate the change: ```shell sudo sysctl -p ``` Example: ```shell $ sudo sysctl -p net.core.rmem_default = 26214400 net.core.rmem_max = 26214400 ``` 1. **Run** the following command to validate the rmem max. ```shell sudo sysctl net.core.rmem_max ``` Example: ```shell $ sudo sysctl net.core.rmem_max net.core.rmem_max = 26214400 ``` If the values are the expected ones, the kernel has been tweaked, and now users should do a test to validate transfers.