Slackware HowTo

Configure multiple swap priorities on Slackware

Use multiple swap areas and choose which devices should be preferred by the kernel.

1. When to use it

Useful when you have swap on different devices and want to prefer the faster ones.

swap | swapon | priority | proc/swaps | performance

2. Base setup

swapon /swapfile1
swapon /swapfile2
swapoff /swapfile2
swapon -p 50 /swapfile1
swapon -p 10 /swapfile2

Adjust host names, IPs, interfaces, paths, and versions to the real system before making the change persistent.

3. Quick verification

swapon --show
cat /proc/swaps
free -m

Confirm that the output matches the expected state before considering the intervention complete.

4. Operational notes

Assign higher priority to faster devices, but remember that slow swap still signals insufficient memory.

Quick checklist

[ ] Steps completed\n[ ] Config updated\n[ ] Tests executed\n[ ] Rollback ready\n[ ] Logs checked

Back to Linux HowTo