For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configuring swap space

Add swap space to prevent out-of-memory crashes during node operation.

Swap provides overflow memory on disk when physical RAM is exhausted. It prevents out-of-memory crashes but is significantly slower than real RAM.

Check existing swap

swapon -s
Example of enabled swap
Server RAM
Swap size

4 -- 16 GB

8 GB

16+ GB

16 GB

Swap is not a replacement for physical RAM. If your server constantly uses swap, upgrade memory instead.

Create and enable swap

  1. Create an 8 GB swap file:

  1. Restrict permissions:

  1. Initialize and enable the swap area:

  1. Make swap persistent across reboots:

  1. Verify swap is active:

  1. Tune swap behavior:

Last updated