Swap space allocation for large memory systems needs improvement

Bug #1032322 reported by Robbie Williamson
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
partman-auto (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Won't Fix
Undecided
Unassigned

Bug Description

The recipe used for automatic swap space allocation during install this is:

100% 512 200% linux-swap
        $lvmok{ }
        $reusemethod{ }
        method{ swap }
        format{ } .

Where we currently allocate a minimum of 100% of swap (maximum 200%). The original justification for this is that you need 100% of your memory to guarantee hibernate works (bug #311299). However, for servers, we don't hibernate and often have large amounts of memory installed, i.e. 100's of GB or even TBs, and such a method wastes a lot of disk space.

I propose we do at least 100% (probably a bit more) for machines up to a certain level of memory (4GB or less.../maybe/ up to 8GB), to ensure client machines can hibernate. However after that, we set some sort of sliding scale approach that maxes out at a reasonable amount for servers. Experienced users can always override the settings if they want.

Changed in partman-auto (Ubuntu Precise):
status: New → Confirmed
Changed in partman-auto (Ubuntu Quantal):
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

While I would tend to agree, I would say that default settings (e.g. 100% memory) is for the default/majority of systems. If memory on the machine is 100's of GB or even TBs, custom partman recipes should be used to tune the machine.

While currently not supported, I would like to see magic factors a keen to check_mk magic factor for disk space notifications. [0]

[0] table at http://mathias-kettner.de/checkmk_filesystems.html

Changed in partman-auto (Ubuntu Quantal):
importance: Undecided → Wishlist
Revision history for this message
Robbie Williamson (robbiew) wrote :

I disagree with the importance being set to "Wishlist".

 "I would say that default settings (e.g. 100% memory) is for the default/majority of systems"...what systems are you referring to? If you mean Desktop, sure...but not Server, where it is customary to have a LOT of RAM in your configuration.

Revision history for this message
Steve Langasek (vorlon) wrote :

Agreed that this is more than just a wishlist. AIUI, for cloud compute nodes this swap requirement can as much as double the local disk space requirements, which is not an appropriate outcome. I think we really need different recipes for server vs. desktop installs, here.

Changed in partman-auto (Ubuntu Quantal):
importance: Wishlist → Medium
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

As per https://wiki.ubuntu.com/Bugs/Importance
"""
Wishlist: Missing functionality.
* If it is non-trivial to implement, it should rather be written as a feature specification, see FeatureSpecifications.
"""
It is possible to modify the default recipes, but that will harm the Desktop installations. [1]
Another possibility is to introduce alternative package partman-auto-server, which will replace/divert partman-auto recipes.
Or we could push for recipe "flavour" support in Debian.

I think it will be useful to have a UDS session as part of foundations or server track to discuss this, choose what needs modification and how to implement it. Probably all default recipes need a "refresh" or a review to make sure they are all still relevant.

[1] desktop users like hibernate: 42 000+ views on the askubuntu.com website for the question "How to enable hibernate?" http://askubuntu.com/questions/94754/how-to-enable-hibernation-in-12-04

Revision history for this message
Robbie Williamson (robbiew) wrote :

As ex-lead of Foundations and ex-release manager of 10.10, I'm well aware of bug definitions, thanks. I also know desktop users "like" hibernate, despite the project's decision to disable by default. I think the issue is that the decision on how to handle swap was taken back when Ubuntu was a primarily desktop focused OS, and thus it made sense to do what most needed....times have change, so I certainly think we should have a UDS session on this and will make sure this occurs.

Steve Langasek (vorlon)
tags: added: rls-q-tracking
tags: added: rls-q-notfixing
removed: rls-q-tracking
no longer affects: partman-auto (Ubuntu Quantal)
Revision history for this message
Oliver Grawert (ogra) wrote :

hibernation should only write the actively changed data (diry pages) from ram to disk, that definitely wont hit 100% of your physical RAM...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Fixed:
http://blog.surgut.co.uk/2016/12/swapfiles-by-default-in-ubuntu.html

Cleaningup old bugs, so settign fix released here.

Changed in partman-auto (Ubuntu):
status: Confirmed → Fix Released
Changed in partman-auto (Ubuntu Precise):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers