If my only "hard drive" is a smallish SSD, are there any advantages to setting up a swap partition rather than a swap file?
1 Answer
It makes no difference either way.
-
1That's wrong. The kernel does support hibernating to a swap file. This works out of the box on some Ubuntu releases, others require manual tuning of the kernel command line in the bootloader configuration. Jun 23, 2011 at 15:08
-
I am pretty sure it has never worked out of the box since it requires manually pointing the resume_offset boot parameter to the location of the file, but I guess that does work if you bother. Answer corrected.– psusiJun 23, 2011 at 15:18
-
@psusi I know there is at least one hibernation framework on at least one Ubuntu version where you just issue the hibernate command and it takes care of setting up
resume_offset
. I don't remember which version that was, possibly 9.04 or 9.10 or 10.04, and I think the framework wasuswsusp
but I'm not sure. Jun 23, 2011 at 15:24 -
@Gilles uswsusp is something you have to install yourself. Out of the box Ubuntu has always just used the built in kernel implementation.– psusiJun 23, 2011 at 15:57
-
@punsi Thank you for your answer. Why would anyone choose a swap partition over a swap file, then, especially for smaller drives? What do you gain? Jun 23, 2011 at 23:20