Difference between revisions of "Talk:Swap"

From ArchWiki
Jump to: navigation, search
(advantages of usb pendrive swap disputed: Done.)
(gets swap really still actived twice by systemd?: re, close)
 
(28 intermediate revisions by 10 users not shown)
Line 1: Line 1:
== <s> advantages of usb pendrive swap disputed </s> ==
+
==<s>gets swap really still actived twice by systemd?</s>==
 +
There is a section about systemd trying to activate swap twice, and several ideas how to work around the error message which appears due to the second attmept to swapon.
 +
Is it still an issue?
 +
I think Lennart fixed this maybe:
 +
https://lists.freedesktop.org/archives/systemd-devel/2015-January/027521.html
 +
and the following mails...
 +
[[User:Mearon|Mearon]] ([[User talk:Mearon|talk]]) 05:45, 22 November 2016 (UTC)
  
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.
+
:I'm sorry, where is the section? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:52, 22 November 2016 (UTC)
  
access time is lower than traditional HD
+
:: Sorry for not providing a Link. It's here: https://wiki.archlinux.org/index.php/Swap#Activation_by_systemd [[User:Mearon|Mearon]] ([[User talk:Mearon|talk]]) 14:21, 22 November 2016 (UTC)
  
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.).
+
:::Well, the first part of the section sounds right, but the second might be outdated as you indicate, so I've [https://wiki.archlinux.org/index.php?title=Swap&diff=457718&oldid=456355 flagged it]. I can't test the behaviour now, let's see if somebody can... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:43, 24 November 2016 (UTC)
  
avoid power on HD when is in stand-by
+
::::I've tested it on the lastest Arch install from the April ISO and can confirm that the issue is fixed. Also I think there should be a clarification regarding the fact that systemd only looks at the disk containing the root filesystem. So if you have swap on a separate disk systemd fails to autoload it without an fstab entry. Should I remove the section and add the clarification above. [[User:Hashhar|Hashhar]] ([[User talk:Hashhar|talk]])
  
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.)
+
:::::Thanks, I've removed the outdated part now. The section says "systemd-gpt-auto-generator inspects the root disk", but feel free to make it clearer. Closing this in the meantime. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:41, 13 April 2017 (UTC)
  
USB pendrives are cheaper than HD (meaning: you can't get a $5 HDD, price per gigabyte is obviously much higher for flash drives)
+
== systemd-swap ==
  
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.
+
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?
[[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)
+
{{unsigned|16:41, 11 January 2017‎|An2quo}}
:: Done. Show DISADVANTAGES first. [[User:Fengchao|Fengchao]] 12:16, 20 March 2012 (EDT)
+
 
 +
: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)

Latest revision as of 18:41, 13 April 2017

gets swap really still actived twice by systemd?

There is a section about systemd trying to activate swap twice, and several ideas how to work around the error message which appears due to the second attmept to swapon. Is it still an issue? I think Lennart fixed this maybe: https://lists.freedesktop.org/archives/systemd-devel/2015-January/027521.html and the following mails... Mearon (talk) 05:45, 22 November 2016 (UTC)

I'm sorry, where is the section? -- Lahwaacz (talk) 07:52, 22 November 2016 (UTC)
Sorry for not providing a Link. It's here: https://wiki.archlinux.org/index.php/Swap#Activation_by_systemd Mearon (talk) 14:21, 22 November 2016 (UTC)
Well, the first part of the section sounds right, but the second might be outdated as you indicate, so I've flagged it. I can't test the behaviour now, let's see if somebody can... -- Lahwaacz (talk) 16:43, 24 November 2016 (UTC)
I've tested it on the lastest Arch install from the April ISO and can confirm that the issue is fixed. Also I think there should be a clarification regarding the fact that systemd only looks at the disk containing the root filesystem. So if you have swap on a separate disk systemd fails to autoload it without an fstab entry. Should I remove the section and add the clarification above. Hashhar (talk)
Thanks, I've removed the outdated part now. The section says "systemd-gpt-auto-generator inspects the root disk", but feel free to make it clearer. Closing this in the meantime. -- Lahwaacz (talk) 18:41, 13 April 2017 (UTC)

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)