SteamOS icon indicating copy to clipboard operation
SteamOS copied to clipboard

[Suggestion] use a Swap File not a Swap partition and set the Swap for Performance

Open waitwhobrokethat opened this issue 12 years ago • 8 comments

a Swap File is way better for a Desktop/Console OS

"As an alternative to creating an entire partition, a swap file offers the ability to vary its size on-the-fly, and is more easily removed altogether. This may be especially desirable if disk space is at a premium (e.g. a modestly-sized SSD)."

https://wiki.archlinux.org/index.php/swap#Swap_file_creation

also set the Swap for Performance

https://wiki.archlinux.org/index.php/swap#Performance_Tuning

waitwhobrokethat avatar Dec 22 '13 06:12 waitwhobrokethat

Swap files can become fragmented leading to reduced performance if they're used. The main thing tho is that you shouldn't be swapping on a games machine. It would seriously effect your game performance. The moment you start swapping regularly is the moment you need to buy more ram.

hitsuji avatar Dec 22 '13 06:12 hitsuji

Some performance tuning can be good idea but swap on file I think is a bad idea.

Fantu avatar Dec 22 '13 11:12 Fantu

i agree with hitsuji and Fantu, having a swap file usually fragments the file system when its used, had this problem under windows a few times. linux distributions have a reason why they recommend creating a swap partition by default

W4RH4WK avatar Dec 22 '13 11:12 W4RH4WK

The swap partition is used for Clonezilla boot purposes, I don't think it can work if a file is used instead.

directhex avatar Dec 22 '13 12:12 directhex

Swap files also have to deal with the FS overhead that is not present with using a partition.

Tele42 avatar Dec 22 '13 14:12 Tele42

Honestly there isnt much of a diffrence if you make a swap file on a new shinny install over a swap partition and never expand it it wont fragment.. The fragmentation comes from when you make it on a dirty drive (windows).. Unlike windows linux ext 3/4 is more efficent in even if you created said swap in the middle of the drive it would still be contiguious thats the beauty of ext 4 it would always read it as a contigous section... Where it differs if you want to expand a swap partition it willl never fragment do to the space is always from x and y range of blocks eather at the beginning or end of the drive depending on how you partitioned it.. Where a swap file would because it would snag the next free space..

So if you created a 12gb swap partition when you set the system up or a 12 gb swap file and set it up your not going to see any decrease or increase it will be just the same so long as you never expanded the swap file..

JamieeLee avatar Dec 27 '13 21:12 JamieeLee

@RaverX3X I don't see how that addresses the issue of why the swap partition is there in the first place. I really don't think CloneZilla's "bootfrom" kernel parameter supports a swap file

directhex avatar Dec 28 '13 22:12 directhex

Because default linux partition and kernels address swap partition by default....

JamieeLee avatar Dec 31 '13 23:12 JamieeLee