Propose your solution
Attachments
No attachments.
Duplicates
Comments
|
|
|
You must be a Windows user. Have a file on your partition for swap creates incredible defragmentation which will only create more overhead when searching for files. Why not have it separated with a distinct partition?
|
|
|
|
I think you cannot hibernate to a swapfile.
|
|
Auzy
wrote on the 4 Oct 08 at 15:34
|
|
|
@Zooounds, that can be fixed though..
@brattalton check your sources. You allocate the swap file, defrag it once (or ensure its allocated already defragged), and there isn't any fragmentation. The advantage is though, at least the file can expand if you run out of swap file, with a swap partition, stuff will just crash!
|
|
pyrates
wrote on the 12 Oct 08 at 04:43
|
|
|
|
Yes I am a windows user. But OS X works this way too because the complexity of having a separate partition for the swap shouldn't be necessary. It's a lot easier resizing a file then it is to resize a swap partition isn't it?
|
|
|
brettalton, you must be a really stupid user.
Allocate a swap file does NOT create "incredible" defragmentation.
Swapping to a file does not create any extra overhead: http://en.wikipedia.org/wiki/Paging#Linux
@zooounds, you can hibernate to a swap file. You just need to add "resume_offset" command to kernel options, and this is what this idea is all about.
|
|
pyrates
wrote on the 7 Dec 08 at 07:28
|
|
|
|
If we can get this implemented, then we can simplify the installation process by allowing the end user to just select which partition to install Ubuntu onto, much like how Windows and OS X does it. They don't involve any complex mount points that you're forced to choose. That unneeded complexity would all be hidden by this.
|
|
gnc
wrote on the 14 Dec 08 at 00:32
|
|
|
IMHO users should be able to choose at install time between swap file, swap partition or swapless system.
Swap file is as fast as a swap partition.
(http://lkml.org/lkml/2005/7/7/326)
|
|
pyrates
wrote on the 21 Dec 08 at 01:28
|
|
|
|
So then according to the link gnc posted, Ubuntu should have no problem switching over to using a swap file instead of a swap partition. Sure does make sense to me.
|
|
borsook
wrote on the 21 Dec 08 at 14:40
|
|
|
|
Actually swap partitions work great with windows, system is much faster then simply because windows always fragments swap file whatever one does... ;)
|
|
chareos
wrote on the 22 Dec 08 at 16:20
|
|
|
A good reason would be that if I add RAM to my PC and my swap parttion is not big enough, I lose my ability to hibernate the system.
Changing swapfile size is much easier than change partition size, am I correct ?
|
|
iva2k
wrote on the 18 Jan 09 at 05:58
|
|
|
+1 for swapfiles
Swapfile is a very useful feature for my cause. I use MacBookPro with tripple-boot (Mac OSX, Ubuntu, WinXP). Due to various limitations of GRUB, WinXP+BootCamp, MacOSX, EFI, etc, extended partitions cannot be used (can you believe that in 21st century?), so I left with only 4 primary MBR partitions, one of which is taken by EFI/GPT. It leaves no place for a swap partition in the scheme of things on MacBookPro. I did a very easy 5-line prep of a file, and got swap on a file on /.
However, implementers beware! It breaks nice uspalsh boot screen and drops into text mode "Reading files needed to boot..." due to /etc/initramfs-tools/conf.d/resume file content. I found this article that may help to do it properly:
http://www.mjmwired.net/kernel/Documentation/power/swsusp-and-swap-files.txt, however after few hours of trial and error hibernate/resume still does not work and usplash drops out. Usplash is easy to fix by removing "quiet" from kernel boot options. Hibernate seems broken due to a bug (see Ubuntu bug #313724 https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/313724).
|
Post your comment
|