Review swap disk size allocation policies

Registered by Robbie Williamson on 2012-08-20

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, and causes problems where the amount of RAM isn't in proportion to the amount of storage, e.g. cloud compute nodes.

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.

Rationale:

Goal:

Blueprint information

Status:
Complete
Approver:
Andres Rodriguez
Priority:
Undefined
Drafter:
Ubuntu Server
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Antonio Rosales on 2012-10-25

Whiteboard

Documentation and limitations of partman-auto-recipes in their current implementation:
http://bazaar.launchpad.net/~vcs-imports/debian-installer/master/view/head:/doc/devel/partman-auto-recipe.txt

Laney, managed to reproduce this with desktop install as well with matching amounts of RAM & HDD (which is not uncommon for high-memory + SSD combos). The minimal size encoded in partman-auto was too small and swap took most of space failing the install completely.

User Stories:

Risks:

Test Plans:

Release Note:

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.