Good Ol’ Swap
Last night on the Georgia US Team IRC channel, #ubuntu-georgia, the topic of swap came up. A user had initally installed Ubuntu, thinking they wouldn’t use it for it long, so no swap partition was set up. After using Ubuntu full-time for some time, the lack of swap space was causing some sluggishness, so he was thinking about reinstalling Ubuntu from scratch and setting up the partitions properly.
Another user provided a link to the awesome SwapFaq on the documentation site. It had a section on the exact question we were looking for: Should I reinstall with more swap? I bring all this up because I was pretty impressed to see how thoroughly the help documentation covered what most users would ever care about: what is it, how much do I need, and how do I add more. No frills, nothing fancy, just concise questions and answers. Users can quickly find what they are looking for and move on. Perfect.
BTW, the answer to the question is that there is no reason to reinstall to add swap space. Any file can be used for swap, and the SwapFaq provides instructions on creating it. While a swap partition may provide slightly better performance, its not reason enough to rebuild an otherwise working system.
Or one can use swapspace which will dynamically add and remove swap files as required — no wasted, fixed size partitions, and Just Works
You said;
However;
—Jesper Juhl
afaik, suspend to disk (hibernate) doesn’t work with file based swap
I’m not sure about problems with suspend and file based swap but I know suspend won’t work if swap is included in an LVM (default on FC/F7). It sure is nice though that we can add a file and swap-on, swap-off for additional swap space.
I’m still working on a flash-drive based swap (like we discussed at dinner when I was out there). flash based would sure be faster than drive based.
suspend2 works with a swap file
“”"I’m still working on a flash-drive based swap (like we discussed at dinner when I was out there). flash based would sure be faster than drive based.”"”
It will be faster. But swap usage patterns tend to shred flash memory quite fast. (remember you only have limited write cycles with flash)