{
  "schema_version": 2,
  "id": "operate/rs/installing-upgrading/configuring/linux-swap",
  "title": "Configure swap for Linux",
  "url": "https://redis.io/docs/latest/operate/rs/7.4/installing-upgrading/configuring/linux-swap/",
  "summary": "Turn off Linux swap space.",
  "content": "Linux operating systems use swap space, which is enabled by default, to help manage memory (pages) by\ncopying pages from RAM to disk. Due to the way Redis Enterprise Software\nutilizes and manages memory, it is best to prevent OS swapping. For more details, see [memory limits](https://redis.io/docs/latest/operate/rs/databases/memory-performance/memory-limit). The\nrecommendation is to turn off Linux swap completely in the OS.\n\nWhen you install or build the OS on the machine intended to host your Redis Enterprise Software cluster, avoid configuring swap partitions if possible.\n\n## Turn off swap\n\nTo turn off swap in the OS of an existing server, VM, or instance, you\nmust have `sudo` access or be a root user to run the following commands:\n\n1. Turn off swap:\n\n    ```sh\n    sudo swapoff -a\n    ```\n\n1. Comment out the swap partitions configured in the OS so swap remains off even after a reboot:\n\n    ```sh\n    sudo sed -i.bak '/ swap / s/^(.*)$/#1/g' /etc/fstab\n    ```\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-10-21T09:46:20-07:00"
}
