[Bug 809190] New: AutoYast suggest wrong swap partition size when using <size>auto</size>
https://bugzilla.novell.com/show_bug.cgi?id=809190 https://bugzilla.novell.com/show_bug.cgi?id=809190#c0 Summary: AutoYast suggest wrong swap partition size when using <size>auto</size> Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: AutoYaST AssignedTo: fehr@suse.com ReportedBy: joschibrauchle@gmx.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22 Using <size>auto</size> for the swap partition of a machine with **8GB** RAM results in AutoYast suggesting a swap partition of size **2GB**. With such a setting, hibernation will not be possible. I would assume that a size of at least the amount of RAM would be suggested. This is part of the XML I'm using: ---------------- <partitioning config:type="list"> <drive> <device>/dev/system</device> <partitions config:type="list"> ...some partitions stripped, there should be space available in the device... <partition> <create config:type="boolean">false</create> <crypt_fs config:type="boolean">false</crypt_fs> <filesystem config:type="symbol">swap</filesystem> <filesystem_id config:type="integer">130</filesystem_id> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <loop_fs config:type="boolean">false</loop_fs> <lv_name>swap</lv_name> <mount>swap</mount> <mountby config:type="symbol">device</mountby> <partition_id config:type="integer">130</partition_id> <partition_nr config:type="integer">6</partition_nr> <resize config:type="boolean">false</resize> <size>auto</size> </partition> </partitions> <pesize>4M</pesize> <type config:type="symbol">CT_LVM</type> </drive> </partitioning> ---------------- Reproducible: Always Steps to Reproduce: 1. Use <size>auto</size> on a swap partition Actual Results: For a testmachine with 8GB RAM, 2GB swap was suggested. Expected Results: A swap size of at least the size of the installed RAM should be suggested. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=809190 https://bugzilla.novell.com/show_bug.cgi?id=809190#c1 --- Comment #1 from Joschi Brauchle <joschibrauchle@gmx.de> 2013-03-13 16:05:21 UTC --- Created an attachment (id=529568) --> (http://bugzilla.novell.com/attachment.cgi?id=529568) y2logs -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=809190 https://bugzilla.novell.com/show_bug.cgi?id=809190#c2 --- Comment #2 from Joschi Brauchle <joschibrauchle@gmx.de> 2013-03-13 16:27:41 UTC --- Ok, maybe I get this wrong, but in https://github.com/yast/yast-storage/blob/master/storage/src/modules/Partiti... there is a limitation for the swap size to at most 2048 MB?!? Line 409 and cont: -------------- if( swap_size > 2048 ) { swap_size = 2048; } if( swap_size < 0 ) { swap_size = 0; } -------------- Why is that? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=809190 https://bugzilla.novell.com/show_bug.cgi?id=809190#c3 Thomas Fehr <fehr@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #3 from Thomas Fehr <fehr@suse.com> 2013-03-13 16:35:25 UTC --- Autoyast uses the same size for swap as the proposal code in interactive YaST. So far I did not get requests to change that. Problem is that requirements for swap for traditional swap usage and for hibernation are quite different. For normal swap, 2G (the current upper limit) is plenty and any real-world system really using more than 2G swap would be more or less unusable. For hibernation the swap size should indeed be larger. But this is mostly useful for laptops while I would assume most autoyast installations are on other systems. So far I do not plan to change size determined by "auto". What could be done, would be adding something like "hibernate" keyword in addition to "auto", which would Autoyast make choose maximum of "auto" size and memory size. Maybe it would be interesting to raise this question on "opensuse-autoinstall" mailing list to get some more input from other users. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=809190 https://bugzilla.novell.com/show_bug.cgi?id=809190#c4 --- Comment #4 from Joschi Brauchle <joschibrauchle@gmx.de> 2013-03-13 17:05:30 UTC --- (In reply to comment #3)
Problem is that requirements for swap for traditional swap usage and for hibernation are quite different. For normal swap, 2G (the current upper limit) is plenty and any real-world system really using more than 2G swap would be more or less unusable. True.
For hibernation the swap size should indeed be larger. But this is mostly useful for laptops while I would assume most autoyast installations are on other systems. Also true.
But this seems to be more a problem of the Yast Storage module than AutoYast, right? So does the storage module actually propose swap size >=RAM on laptops when the user asks for a partitioning proposal? I did not check this... but if not, then the automatic partitioning proposal would make hibernation impossible for the "not-so-tech-savvy" user. Just out of curiosity: Is it currently possible to use a "hibernation file" like Windows, located on some filesystem? This way, one would get around the requirement of having such a large swap partition and 2GB would be enough. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=809190 https://bugzilla.novell.com/show_bug.cgi?id=809190#c5 --- Comment #5 from Thomas Fehr <fehr@suse.com> 2013-03-13 17:26:49 UTC --- Yes, the size calculation is done in Partitions.ycp which is part of yast2-storage. But since I am currently maintaining both modules, this is not relevant.
But this seems to be more a problem of the Yast Storage module than AutoYast, right? So does the storage module actually propose swap size >=RAM on laptops when the user asks for a partitioning proposal?
From the fact that we do not get complaints or bugreports about that, I would assume not a large number of non-tech-savy linux user use laptops with more than 2Gig RAM. But in my opinion linux on laptops is a marginally
No, as you already looked up, the swap size proposal has a hard upper size limit of 2G. And you are right this is not optimal for hibernation. percentage anyway (probably by far most linux laptop users work for linux companies ;-) and laptops with linux preinstalled, the size can be chosen correctly. Unfortunately changing swap size for all systems would probably cause more trouble (e.g. in area of o virtual machines with small virtual disks). And it is not too easy to detect if a machine is a Laptop from looking at hardware data. I am not a kernel expert and so I do not know if one could use a file. Certainly not without significant changes in resume handling and probably not in the general case (e.g. on LVM, Raid) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=809190 https://bugzilla.novell.com/show_bug.cgi?id=809190#c6 --- Comment #6 from Joschi Brauchle <joschibrauchle@gmx.de> 2013-03-14 08:02:47 UTC --- Ok, I understand the current design and will work around it by using an extra AY rule. You can close the bugreport as WONTFIX then if you like or change to a feature request. Maybe in the long run this module could be adapted, such that it displays some kind of message on the partitioning summary, saying that hibernation will not be possible with "swap size"<RAM. (In reply to comment #5)
But in my opinion linux on laptops is a marginally percentage anyway (probably by far most linux laptop users work for linux companies ;-) and laptops with linux preinstalled, the size can be chosen correctly. I would assume that in the educational sector Linux is also very common on laptops, at least that is my usage case :) may people there deliberately buy machines without operating system installed or remove anything preinstalled.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=809190 https://bugzilla.novell.com/show_bug.cgi?id=809190#c7 Thomas Fehr <fehr@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #7 from Thomas Fehr <fehr@suse.com> 2013-03-14 17:19:31 UTC --- I changes this now so that in interactive YaST you have a checkbox where you can tell that you want an enlarged swap for suspend being possible. For autoyast I added the special keyword "suspend" in addition to "auto" to be understood as swap size. If "suspend" is found there will be no limit on swap size at 2G and memory size is used as swap size if it is larger than the size that would be used with "auto". All this channges are post 12.3 ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=809190 https://bugzilla.novell.com/show_bug.cgi?id=809190#c8 --- Comment #8 from Joschi Brauchle <joschibrauchle@gmx.de> 2013-03-15 09:25:59 UTC --- Thanks a lot for the changes. I added the modified files from yast2-storage and autoyast2 to my inst-sys and can confirm that the "suspend" keyword works as expected now. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com