You are not logged in.
I thinking about to use a swapfile instead of a swap partition.
Now I want to know , if i have some disadvantages with a swapfile?
What is about suspend to disk, can it handle this?
Last edited by fk (2007-03-27 13:26:38)
Have you tried to turn it off and on again?
Offline
Its interesting this topic comes up I was thinking about losing my swap partition today
/tmp space seems to take up half my ram ??? is that good or bad
Assumed swap space was for lower end systems with low ram
/me watches thread
Mr Green I like Landuke!
Offline
Its interesting this topic comes up I was thinking about losing my swap partition today
/tmp space seems to take up half my ram ??? is that good or bad
Assumed swap space was for lower end systems with low ram
/me watches thread
If you use tmpfs , the default size is half of RAM, but only what is need are in use
swap only for old systems?
Have you tried to turn it off and on again?
Offline
swap isnt essential on many modern systems *depending on the workload and ram*
So yeah, if you're doing anything remotely ram intensive, such as graphics work, or video, or audio work (not just playing), then swap is good and useful.
If you use a lot of ram, or tend to use lot's of programs, then swap is also useful, as applications can be swapped out, and ram used for caches.
So it's fine to have swap. There's no disadvantage to having it. And 512mb/1gb on a hard drive nowadays is generally cheap and sparable.
James
Offline
Swapfile is limited to file size limits.
Swap partition is usually much greater than file-limited swapfile, set by the user.
Answered your query...
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
If you can't fill your RAM, then you have no need for swap.
Offline
Sorry guys, the question isn't whether swap is useful, its whether a swap file is better than a swap partition.
I don't recall directly, but I believe its possible for swap files to become noncontiguous, which doesn't happen with a swap partition. This can cause access time to be reduced for a partition.
On the other hand, its easier to resize a swap file if you find you're running out of room.
Dusty
Offline
http://enterprise.linux.com/article.pl? … 129&tid=42
Dusty is right ... resizing a swap-file is easier
how can you tell if swap is being used ??? [realtime] conky I guess
Mr Green I like Landuke!
Offline
The swap size is not the problem, I haven't seen that my swap are in use, evrytime 100% free.. I have 2GB RAM, but I have read that swap is fundamental for kernel performache, so I would make a 512MB swapfile instead of a swappartition.
Last edited by fk (2007-03-21 13:34:11)
Have you tried to turn it off and on again?
Offline
free
total used free shared buffers cached
Mem: 2075680 2003488 72192 0 46248 1579344
-/+ buffers/cache: 377896 1697784
Swap: 4996204 0 4996204
something ate my ram lol ... ignore swap size I just had a spare partition which I used, would be handy for something else though
Mr Green I like Landuke!
Offline
any other opinions here?
Have you tried to turn it off and on again?
Offline
i ould go for a swap partition on it's own ..
reason being that if the host partition becomes fragmented, and yes it will not much but it will ..
i'd rather not be able to resize it ... [debated below] than have it become slower...
the question on whether you are able to resize it can in soem cases become, well in soem cases it does not apply..
i currently have a 2gb swap partition ... i hardly ever use it, but when i do it becomes very necessary to have it large (i often wanna play games and encode videos at the same time) .. but the point i'm trying to make is that if you leave it at hte end of the drive .. then you can resize it into free space whenever you like.
The.Revolution.Is.Coming - - To fight, To hunger, To Resist!
Offline
A swap partition is always better than a swap-file. No overhead/buffering from file system. I think you can compare a swap partition with a dedicated raw-device which performes better than the file-system.
Placing the swap partition at the end of the disk, like noriko suggests, is not the best place I'm afraid. In the middle would be best to minimize the movement of the read/write heads.
Somewhere between "too small" and "too large" lies the size that is just right.
- Scott Hayes
Offline
i might add, that suspend2 supports suspend/resume from a file. Take a look at the details on their site.
James
Offline
A swap partition is always better than a swap-file. No overhead/buffering from file system. I think you can compare a swap partition with a dedicated raw-device which performes better than the file-system.
Placing the swap partition at the end of the disk, like noriko suggests, is not the best place I'm afraid. In the middle would be best to minimize the movement of the read/write heads.
Really? I found this
http://lkml.org/lkml/2005/7/7/326
and it says that the filesystem isn't a problem..
Last edited by fk (2007-03-23 18:13:45)
Have you tried to turn it off and on again?
Offline
It seems that my computer is running 2.6, but my brain is still polluted with 2.4 knowledge. Sorry about that.
Somewhere between "too small" and "too large" lies the size that is just right.
- Scott Hayes
Offline
I might suggest that both types of swap could be provided...a swapfile and a partition. As noriko suggests it may be advantageous when multitasking.
I would also suggest that a dual swap partition is possible, one in the middle of the partition scheme and a second at the end in free space area. These could also be appended by a swapfile.
If such an arrangement is performed the priority can be assigned such that the swaps act as a "raid" system.
The usefulness of swap is user dependent on what the user desires to use it for......
Swapon and swapoff can be implemented to modify the setup's response at the user's discretion.
Should the flash drives be improved(perhaps with hafnium chips) external swap drives will be viable.
Just some thoughts on the subject.....
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
I set up swap for my system from the old days when you ran a swap partition twice the size of ram
Now that said I ended up with a huge swap partition simply because I stopped having /var on it
To me swap space was used for older older systems with low ram, is there any need to have swap space at all?
Its a tough call it should be left down to the user to suit there needs
Mr Green I like Landuke!
Offline
dr_te_z wrote:A swap partition is always better than a swap-file. No overhead/buffering from file system. I think you can compare a swap partition with a dedicated raw-device which performes better than the file-system.
Placing the swap partition at the end of the disk, like noriko suggests, is not the best place I'm afraid. In the middle would be best to minimize the movement of the read/write heads.
Really? I found this
http://lkml.org/lkml/2005/7/7/326
and it says that the filesystem isn't a problem..
Thanks for that link. But it should answer your question, shouldn't it?
Offline
fk wrote:dr_te_z wrote:A swap partition is always better than a swap-file. No overhead/buffering from file system. I think you can compare a swap partition with a dedicated raw-device which performes better than the file-system.
Placing the swap partition at the end of the disk, like noriko suggests, is not the best place I'm afraid. In the middle would be best to minimize the movement of the read/write heads.
Really? I found this
http://lkml.org/lkml/2005/7/7/326
and it says that the filesystem isn't a problem..
Thanks for that link. But it should answer your question, shouldn't it?
Yes, it does.
Have you tried to turn it off and on again?
Offline
One more question:
Where is the best place for a swapfile
in /var?
Have you tried to turn it off and on again?
Offline
I do not know if there is a "best" place (the place is just unrelevant for performance). Since it is a file created by hand and not seen by the package manager, I like to put it where the package manager does not operate, i.e. in /usr/local.
Mortuus in anima, curam gero cutis
Offline
i.e. in /usr/local.
When you take these (http://tldp.org/LDP/sag/html/fs-background.html) serious I'd say somewhere in /tmp. When you've got /tmp assigned to tmpfs then use /var.
Somewhere between "too small" and "too large" lies the size that is just right.
- Scott Hayes
Offline