Difference between revisions of "Talk:Swap"

From ArchWiki
Jump to: navigation, search
(advantages of usb pendrive swap disputed: Done.)
m (forgot signing)
 
(37 intermediate revisions by 13 users not shown)
Line 1: Line 1:
== <s> advantages of usb pendrive swap disputed </s> ==
+
== systemd-swap ==
  
First of all, USB 2.0 has a practical limit of about 25 MB/sec throughput, no matter what kind of device is on the other end. Your internal hard drive can probably make at least 70 MB/sec, and nearly all modern drives can read/write faster than that.
+
Can we add more documentation on what this is? How it works? What's the difference between Swap File Universal and Swap File Chunked? Do we need to activate both zram and zswap? Do we need both swapfu and swapfc? When would we want a certain configuration? Where is the swap file located? Can we use this to enable hibernation?
  
access time is lower than traditional HD
+
{{unsigned|16:41, 11 January 2017‎|An2quo}}
  
Definitely true for "real" SSD's, but usually not for USB flash drives. Most cheaper flash chips actually have slower than HD read/write performance; high-performance SSD's achieve that by being massively interleaved so that a read or write is parallel over many chips (like RAID-0 for flash). Cheap flash drives don't do that, and often their controller is so cheap that even seek time is slower than a spinning HD (try it sometime -- take a directory of many tiny files and try to randomly read them. It'll go faster on the HD.).
+
:That information seriously belongs to https://github.com/Nefelim4ag/systemd-swap -- not here, since they are just details for the script. We already describe the background info in [[Swap]], [[Zswap]], [[Improving_performance#Zram_or_zswap]] and [[Power_management/Suspend_and_hibernate#Hibernation]], your questions can be answered by simply reading the script. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:59, 11 January 2017 (UTC)
  
avoid power on HD when is in stand-by
+
== swapspace ==
  
Um, what? Hard drives are always turned off in standby. They're a persistent storage device, so they don't need power to maintain what was written to them. *RAM* needs to stay on and be refreshed, but that's going to be true no matter what you use for swap. If your laptop isn't spinning down the hard drive when you're in sleep mode, there's something wrong with your power management software/firmware and it's not actually making it into sleep mode. (If this is happening, it's also dangerous -- spinning disks don't like being jostled, and most people put their laptops to sleep when they're going on the move.)
+
Before I just go and do it, I wish to know if a section about [https://aur.archlinux.org/packages/swapspace/ swapspace (aur)] would be useful. It dynamically allocates SWAP as needed.
  
USB pendrives are cheaper than HD (meaning: you can't get a $5 HDD, price per gigabyte is obviously much higher for flash drives)
+
{{unsigned|03:13, 1 September 2017‎|Krutonium}}
  
True you can't get a $5 HDD, but you're much better off putting your user data (pictures, documents, music, etc.) on that $5 flash drive than your swap. If you're out of space and need to free up 2 gigs for more swap space, buy the $5 flash drive, move 2 GB of your stuff onto it, then put your swap partition on the hard drive. It'll be way faster.
+
:There is already {{Pkg|systemd-swap}}, so why not... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:23, 1 September 2017 (UTC)
[[User:Thetrivialstuff|Thetrivialstuff]] 17:15, 7 January 2012 (EST)
+
 
:Of course you're right, I suggest moving the ADVANTAGES/DISADVANTAGES part at the top of the section and rewriting it with your considerations. I wouldn't recommend just removing the section, since the Arch philosophy aims to give the end user the freedom of choice. -- [[User:Kynikos|Kynikos]] 07:54, 8 January 2012 (EST)
+
== can we add a little more detail to "edit fstab to add an entry for swap file"? ==
:: Done. Show DISADVANTAGES first. [[User:Fengchao|Fengchao]] 12:16, 20 March 2012 (EDT)
+
 
 +
it's not clear to me whether the user should type what follows (both lines) into an elevated terminal, or whether it is saying to navigate to /etc/fstab and then use xed (or whatever) to add the second line.
 +
 
 +
{{unsigned|15:25, 12 September 2017‎|PainfulQs}}
 +
 
 +
:See [[Help:Reading#Append, add, create, edit]], which explains the conventions for this kind of instructions. Also, since there is a link to [[fstab]], it is a good idea to follow it and learn about the format of the string you're being asked to insert. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 15:29, 12 September 2017 (UTC)
 +
 
 +
::I followed and read the fstab page. it's not spelled out (to me at least) *how* to edit fstab. Wouldnt it be clearer to say run terminal, switch to root by "su -" and then "nano /etc/fstab" ? or is that against convention?  [[User:PainfulQs|PainfulQs]] ([[User talk:PainfulQs|talk]]) 15:43, 12 September 2017 (UTC)
 +
 
 +
:::Editing text files is a basic prerequisite for using this wiki, there are so many different options that explaining everything everywhere is pointless. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 15:48, 12 September 2017 (UTC)
 +
 
 +
== Swapfile fstab entry ==
 +
 
 +
Today I tried to setup hibernation on my installation without swap partition thus I had to create a swapfile. Everything worked fine apart from the the fact the the file was not "swaponed" after a reboot. After some googleing I changed the line:
 +
 
 +
    /swapfile none swap defaults 0 0
 +
 
 +
to
 +
 
 +
    /swapfile swap swap defaults 0 0
 +
 
 +
as RedHat and CentOS have it and it resolved the problem. Can someone comment on this / verify that this is not only an issue on my system? Apart from RetHat and CentOS the other distributions / tuts / forums use the current fstab line.
 +
 
 +
[[User:Eyenseo|Eyenseo]] ([[User talk:Eyenseo|talk]]) 17:48, 19 November 2017 (UTC)

Latest revision as of 17:48, 19 November 2017

systemd-swap

Can we add more documentation on what this is? How it works? What's the difference between Swap File Universal and Swap File Chunked? Do we need to activate both zram and zswap? Do we need both swapfu and swapfc? When would we want a certain configuration? Where is the swap file located? Can we use this to enable hibernation?

—This unsigned comment is by An2quo (talk) 16:41, 11 January 2017‎. Please sign your posts with ~~~~!

That information seriously belongs to https://github.com/Nefelim4ag/systemd-swap -- not here, since they are just details for the script. We already describe the background info in Swap, Zswap, Improving_performance#Zram_or_zswap and Power_management/Suspend_and_hibernate#Hibernation, your questions can be answered by simply reading the script. -- Lahwaacz (talk) 16:59, 11 January 2017 (UTC)

swapspace

Before I just go and do it, I wish to know if a section about swapspace (aur) would be useful. It dynamically allocates SWAP as needed.

—This unsigned comment is by Krutonium (talk) 03:13, 1 September 2017‎. Please sign your posts with ~~~~!

There is already systemd-swap, so why not... -- Lahwaacz (talk) 08:23, 1 September 2017 (UTC)

can we add a little more detail to "edit fstab to add an entry for swap file"?

it's not clear to me whether the user should type what follows (both lines) into an elevated terminal, or whether it is saying to navigate to /etc/fstab and then use xed (or whatever) to add the second line.

—This unsigned comment is by PainfulQs (talk) 15:25, 12 September 2017‎. Please sign your posts with ~~~~!

See Help:Reading#Append, add, create, edit, which explains the conventions for this kind of instructions. Also, since there is a link to fstab, it is a good idea to follow it and learn about the format of the string you're being asked to insert. -- Lahwaacz (talk) 15:29, 12 September 2017 (UTC)
I followed and read the fstab page. it's not spelled out (to me at least) *how* to edit fstab. Wouldnt it be clearer to say run terminal, switch to root by "su -" and then "nano /etc/fstab" ? or is that against convention? PainfulQs (talk) 15:43, 12 September 2017 (UTC)
Editing text files is a basic prerequisite for using this wiki, there are so many different options that explaining everything everywhere is pointless. -- Lahwaacz (talk) 15:48, 12 September 2017 (UTC)

Swapfile fstab entry

Today I tried to setup hibernation on my installation without swap partition thus I had to create a swapfile. Everything worked fine apart from the the fact the the file was not "swaponed" after a reboot. After some googleing I changed the line:

   /swapfile none swap defaults 0 0

to

   /swapfile swap swap defaults 0 0

as RedHat and CentOS have it and it resolved the problem. Can someone comment on this / verify that this is not only an issue on my system? Apart from RetHat and CentOS the other distributions / tuts / forums use the current fstab line.

Eyenseo (talk) 17:48, 19 November 2017 (UTC)