Swap Folder?
Quote:
|
you don't create a folder, where does is say that?? you can make a swap file by creating a block file (i.e. from dd) on an existing file system and using mkswap on that as opposed to a partition.
Not sure what you mean by "partition space" here, you won't save any space, you just use it elsewhere. Personally I've made them in the past when I've needed more swap but not been able to allocate real disk. You can also make an LVM volume a swap device too, amongst many other things. |
Quote:
|
again, swap is never a folder.
you can make however many logical partitions you want under an extended partition, so that's not an issue, no. Generally you wouldn't want to go through a filesystem to get swap on to a disk, so you would avoid it. |
Quote:
|
"Note that I said swap spaces and not just swap device or swap partition. Linux allows you to create a swap file. Like any other file, a swap file exists on your filesystem and takes up space. The advantage is that you can add a swap file at any time, provide you have the space on the hard disk. You don't need to to repartition your hard disk or even reboot. "
From here. http://www.linux-tutorial.info/modul...ent&pageid=218 There may be other reasons that may have to do with managing partitions or hardware limits but that would be more rare. |
First of all, let's get our terms straight. A "folder" is a (virtual) container for "files". But actually *nix prefers the term "directory" instead. "Folder" is the Dos/Windows word for it.
"swap" is not a file, or directory. It's a filesystem. It's essentially virtual RAM; hard disk space that can be used as a RAM substitute. It's mostly there for times when you don't have enough physical RAM memory to handle your requirements, but also for things like storing the current running image when suspending your session. There are two options for creating a swap filesystem: 1) You can set up a dedicated partition for it. This option is better for performance, as the swap filesystem can be accessed directly by the kernel. But of course it's also a permanent allocation, as the disk space can't be made available for any other use. 2) Create a swap file. This is an image file of a swap filesystem sitting inside another file system. The advantage here is that you can create and delete swap files as needed, in any number and size. The disadvantage is that the kernel has to access it through the I/O of the containing partition, meaning it's not as efficient performance-wise. Whichever solution you choose, or both, is up to you. Note that the disk partition limits really have nothing to do with swap, which is just another kind of filesystem you can place on a partition. As you seem to understand, a disk with DOS-style partition allocation can only have 4 primary partitions. If you need more, then you can specify one of these partitions to be an "extended" partition, and then create a larger number of "logical" partitions inside of that. The Linux libata driver can currently handle up to 15 partitions on a drive, so for most people this is not a serious limitation. But if you really need all of your partition space for other things, then yes, using a swap file means you don't have to dedicate a partition for it. |
Quote:
|
Quote:
|
Quote:
Seriously, thanks for the info. So are there any real disadvantages to using swap files now? |
Actually, i can't think of any, except may be if you create a swap file on a heavy fragmented drive. But since I always use a partition, just because I am used to it, I simply lack experience here.
|
Thanks Guys, I originally post the question to find out if there was an advantage/disadvantage in creating a swap folder, over the usual swap partition.
Tobi mentioned it in another post, I'd never heard of a swap folder b4 then.:) |
there is *STILL* no such thing as a swap folder.
|
Swap file, my bad.
|
All times are GMT -5. The time now is 07:49 PM. |