Ensure minimum total memory available to desktop systems

Bug #1979997 reported by Dimitri John Ledkov
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * A Desktop install with a Desktop Environment, a web-browser, web-browser based apps (vscode / mattermost / slack / spotify / keybase / etc), may use quite a bit of RAM

 * To elivate or delay OOM behaviour bump our swap & ram calculations

 * Ensure that total available memory (RAM+SWAP) is at least 8GB, without taking up more than 10% of disk space (in non-zfs unencrypted case only).

[Test Plan]

 * Perform following installs:
   - unencrypted
   - encrypted LUKS
   - zfs
   - zfs encrypted

 * .... with following ram configurations
   - 2GB RAM
   - 5GB RAM
   - 8GB RAM
   - 10GB RAM

 * Which should result in
   - 6GB of SWAP
   - 3GB of SWAP
   - 2GB of SWAP
   - 2GB of SWAP

[Where problems could occur]

 * For a number of low RAM combinations this will result in higher swap sizes; which will be a higher % of disk space, meaning minimum amount of disk space required is also going up.

 * Higher RAM machines should not experience any changes

[Other Info]

 * This is primarily driven by average basic desktop usage, with amount of anonymous pages that can be swapped out, as they are unused.

Related branches

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 22.10.5

---------------
ubiquity (22.10.5) kinetic; urgency=medium

  [ Michał Sawicz ]
  * Run after cloud-init if installed

  [ Dimitri John Ledkov ]
  * Ensure minimum available amount of memory available (LP: #1979997)

 -- Dimitri John Ledkov <email address hidden> Wed, 13 Jul 2022 14:19:20 +0100

Changed in ubiquity (Ubuntu):
status: New → Fix Released
Changed in ubiquity (Ubuntu Jammy):
milestone: none → ubuntu-22.04.1
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Dimitri, or anyone else affected,

Accepted ubiquity into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubiquity/22.04.17 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubiquity (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Benjamin Drung (bdrung) wrote (last edit ):

My test procedure: The the new ubiquity version in QEMU on amd64.

1. Boot ubuntu-22.04-desktop-amd64.iso
2. Select "Try Ubuntu"
3. Open terminal and run:
```
xrandr -s 1920x1080
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-proposed main" | sudo tee /etc/apt/sources.list
sudo apt update
sudo apt install ubiquity-frontend-gtk=22.04.17 ubiquity-ubuntu-artwork=22.04.17 ubiquity=22.04.17
```
4. Start ubiquity and install Ubuntu
5. After reboot check SWAP
```
grep SwapTotal /proc/meminfo
```

Results:

| Type | Memory | SWAP | disk size | Diff |
| unencrypted | 10240 MiB | 2097148 kB | 26.844 GB | 0 |
| unencrypted | 8192 MiB | 2097148 kB | 26.844 GB | 0 |
| unencrypted | 5120 MiB | 2744316 kB | 26.844 GB | |
| unencrypted | 5120 MiB | 2891772 kB | 80.531 GB | -0.24 GiB |
| unencrypted | 2048 MiB | 2744316 kB | 26.844 GB | |
| unencrypted | 2048 MiB | 6191100 kB | 80.531 GB | -0.10 GiB |
| encrypted LUKS | 10240 MiB | 1998844 kB | 107.37 GB | -0.09 GiB |
| encrypted LUKS | 8192 MiB | 1998844 kB | 107.37 GB | -0.09 GiB |
| encrypted LUKS | 5120 MiB | 2756604 kB | 107.37 GB | -0.37 GiB |
| encrypted LUKS | 2048 MiB | 5902332 kB | 107.37 GB | -0.37 GiB |
| zfs | 10240 MiB | 2097148 kB | 107.37 GB | 0 |
| zfs | 8192 MiB | 2097148 kB | 107.37 GB | 0 |
| zfs | 5120 MiB | 2891772 kB | 107.37 GB | -0.24 GiB |
| zfs | 2048 MiB | 6191100 kB | 107.37 GB | -0.10 GiB |
| zfs encrypted | 10240 MiB | 2097148 kB | 107.37 GB | 0 |
| zfs encrypted | 8192 MiB | 2097148 kB | 107.37 GB | 0 |
| zfs encrypted | 5120 MiB | 2891772 kB | 107.37 GB | -0.24 GiB |
| zfs encrypted | 2560 MiB | 5640188 kB | 107.37 GB | -0.12 GiB |

Note:

1. This tests needs to be done with a disk size of >= 60 GB to avoid hitting the 10% of disk space limit.
2. The installation with zfs encrypted with 2 GiB was OOM killed every time (tried multiple times). So I used 2.5 GiB instead.

Revision history for this message
Benjamin Drung (bdrung) wrote :

Result after running the complete test matrix: The resulting SWAP size is identical to the expected SWAP size or up to 12 % below the expected size.

I consider this outcome is successful verification.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 22.04.17

---------------
ubiquity (22.04.17) jammy; urgency=medium

  [ Dimitri John Ledkov ]
  * Ensure minimum available amount of memory available (LP: #1979997)

 -- Steve Langasek <email address hidden> Fri, 15 Jul 2022 17:02:02 -0700

Changed in ubiquity (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubiquity has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.