Are there any conventions on where to put swap files on Linux?
I usually just create them in /var/swapfile, but that seems a bit too high up in the hierarchy.
|
|
|
AFAIK there is no location defined in the File System Hierarchy Standard. Because /var is for often-changed files, I would say it is okay to place it here. But remember that if you use a flat-file swap instead of a partition, consider to use a fast file system for /var. |
|||
|
|
|
The conventional way is to have a partition dedicated to swap. If you use a file it's at your own discretion, but Malte's suggestion of the file system being important is a good one. |
|||||||||
|