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
Recommended swap size
Server RAM
Swap size
4 -- 16 GB
8 GB
16+ GB
16 GB
Create and enable swap
Create an 8 GB swap file:
Restrict permissions:
Initialize and enable the swap area:
Make swap persistent across reboots:
Verify swap is active:

Tune swap behavior:
Last updated