Ubuntu 18.04-20.04 Installer creates swap partition too small

Bug #1767299 reported by Johon Doee
178
This bug affects 34 people
Affects Status Importance Assigned to Milestone
partman-auto (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Installed Ubuntu 18.04 final release.

The disk is 512 Gigabyte, the RAM is 8 Gigabyte. The installer just gave me 979 Megabyte of space. I chose LVM to have an encrypted drive.

Here are some details:

free -h
              total used free shared buff/cache available
Mem: 7,7G 4,0G 152M 399M 3,6G 3,0G
Swap: 979M 0B 979M

swapon --show
NAME TYPE SIZE USED PRIO
/dev/dm-2 partition 980M 0B -2

cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/ubuntu--vg-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda2 during installation
UUID=removed-id /boot ext4 defaults 0 2
# /boot/efi was on /dev/sda1 during installation
UUID=removed-id /boot/efi vfat umask=0077 0 1
/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0

Tags: bionic
Johon Doee (jodoee11)
affects: sudo (Ubuntu) → partman (Ubuntu)
affects: partman (Ubuntu) → partman-auto (Ubuntu)
Revision history for this message
Johon Doee (jodoee11) wrote :

Hello. Is there somebody looking into this problem? No comment from ubuntu-devs so far and I wonder if this report is even noticed. To me the importance of the problem seems to be high at least because it might affect all users choosing auto partition, lvm and encryption when installing ubuntu....

Revision history for this message
dragon788 (dragon788) wrote :

Just discovered I'm having the same issue. I used `d-i partman-auto/choose_recipe select atomic` for the install along with `d-i partman-auto-lvm/guided_size string max`. I can dump all the partman parameters here if that helps.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in partman-auto (Ubuntu):
status: New → Confirmed
Paul White (paulw2u)
tags: added: bionic
Revision history for this message
dragon788 (dragon788) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
JohnJay (johnjay) wrote :

This also happened to me. GUI install, Erase all with encryption selected. With a 250GB SSD and 12GB memory the installer gave me a 1GB swap partition and 249GB root partition.

Workaround:

I initially tried to resize the partitions manually after installation but this proved tricky ( see this page if you want to try: https://help.ubuntu.com/community/ResizeEncryptedPartitions )

Far easier was to simply add a swap file to the root partition: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04

Revision history for this message
Phillip Susi (psusi) wrote :

Change appears to be intentional:

partman-auto (134ubuntu1.2) xenial; urgency=medium

  * Introduce partman-auto/cap-ram, to allow capping RAM size as used for
    swap partition calculations. This allows us to effectively cap the
    swap partitions size to maximum of 2*CAP. Default is set to 1024, thus
    capping swap partitions to 2GB maximum. LP: #1351267

 -- Dimitri John Ledkov <email address hidden> Fri, 23 Feb 2018 16:59:11 +0000

So I'm guessing this should be WONTFIX. Is that correct Dimitri?

no longer affects: ubiquity (Ubuntu)
Changed in partman-auto (Ubuntu):
assignee: nobody → Dimitri John Ledkov ๐ŸŒˆ (xnox)
assignee: Dimitri John Ledkov ๐ŸŒˆ (xnox) → nobody
status: Confirmed → Triaged
assignee: nobody → Dimitri John Ledkov ๐ŸŒˆ (xnox)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

It is intentional to have smaller swaps by default than it used to be the case.

you can preseed the cap-ram setting to a higher one, or change the priority to lower one to see that question.

there are two other toggles as well, for the case of swapfile swap.

Changed in partman-auto (Ubuntu):
status: Triaged → Opinion
Revision history for this message
Phillip Susi (psusi) wrote :

Nice to know that the value is configurable.

Revision history for this message
dragon788 (dragon788) wrote :

I wonder if it is an opinion that the number of companies using Ubuntu on laptops might be reduced starting with 18.04 considering the amount of extra effort to write a completely custom partman recipe with a larger swap (or assuming the answer above works in the preseed to actually get the old behavior of 100% or so) in order to use hibernation to conserve battery life, since suspend still tends to run a battery down fairly quickly, and those that don't have access to power now have to shut down their machines completely losing their working state rather than being able to quickly hibernate and resume.

It makes me sad that rather than reuse a preseed that has worked across multiple previous releases of Ubuntu without alteration I now have to come up with a partman recipe to handle whether I need an EFI partition or not as well as how large to make each individual partition including the swap. I feel like introducing a new recipe or at least making it opt-in for the change rather than automatically breaking existing preseeds for everyone.

Revision history for this message
Phillip Susi (psusi) wrote :

I'm kind of partial to hibernation myself, but really these days suspend only uses like 1% per hour ( or less ) so unless you are planning on being suspended for 24+ hours, you really don't need to worry about it.

Revision history for this message
Bast1aan (bast1aan) wrote :

24h is quite short for a laptop not being used, it is less than a weekend. So I'd rather use hibernation for this reason, or I'll find my laptop battery empty on unsuitable moments.

It would be nice if the installers uses LVM by default, then it is quite easy to extend the swap partition afterwards if necessary.

Revision history for this message
dragon788 (dragon788) wrote :

It can also depend whether you have a discrete GPU or not, as sometimes those don't properly power off and eat a lot more battery when running and possibly when suspended. I frequently take my laptop home in case the on-call phone rings, and if I suspend on a Thursday/Friday and I don't pull it out of my bag and plug it in, if it is a holiday weekend I may pull it out and have the battery at 10% or less, which doesn't last long once you get on VPN and have the CPU crunching away at encryption, and having a fully encrypted disk also eats more battery (and makes it harder to do the LVM resize mentioned above).

I'm testing the above mentioned flag and it does appear to at least create the correctly sized partition, though I'm not sure whether for a 32GB RAM system simply doubling 16384 is the right route or if I need to add a little more space for overhead in order to hibernate correctly if the RAM is full or close to full capacity when attempting to hibernate.

Revision history for this message
Oliver Grawert (ogra) wrote :

typically hibernation only collects the dirty pages in ram, compresses them and writes them to disk (swap) as an image (unless the code changed dramatically in the last years).

you will likely not need a 1:1 mapping of swap to ram ...

Revision history for this message
Phillip Susi (psusi) wrote :

IIRC, the default native kernel method does not compress the data, for that you need to install the swsusp2 package I think it was.

Revision history for this message
dragon788 (dragon788) wrote :

Per the above the flag appears to work, and it appears that setting the cap still does the automatic detection when the system memory is equal to or less than the cap.

For example I hardcoded 16384 per above to handle swap for our 32GB RAM laptops, and on our 16GB RAM laptops it knows the system RAM is less and correctly set the actual swap size to 16GB not 32GB.

I'm still not super enthusiastic that this change was applied globally as the default, especially considering it is much easier to throw away an essentially ephemeral cloud compute instance that was the use case for changing the default in the first place, and those would be much easier to customize and test with a flag than every enterprise using Ubuntu for laptops having to scratch their head and hopefully learn about and add this new flag. It gets even more challenging now that there are laptops with 64 or 128GB of RAM available or coming out soon which overlaps or exceeds many consumer or business desktops so they may need to do model detection to figure out if it is a desktop or laptop and increase the cap accordingly.

I really hope the error message is improved when attempting to `systemctl hibernate` when there isn't a large enough swap partition, and I also hope that the Hibernation wiki page(s) are updated to let folks installing 18.04 know that unless they customize the partitions on install or resize them after the fact, they will be unable to hibernate their shiny new laptop and will have to settle for suspending or completely powering off instead.

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

We have for years before this change not supported hibernate out of the box on the desktop. Regardless of whether the triggering bug report was cloud-oriented, this is not a change made just for the cloud. Having too much swap on desktops is ALSO harmful because it will cause the kernel to enter swap death instead of OOM-killing processes to unblock the interactive environment. This change in default behavior of the installer is fully intentional.

Revision history for this message
Bast1aan (bast1aan) wrote :

I think 950MB of swap default is too little for systems with low memory. Default install on a low-end laptop with 4GB of ram supplies me with a 950MB sized swap partition and it is easily filled when running browser with several tabs and some other programs running. Also on 8GB ram machines I get easily 1-2GB swap in use after an uptime of several days.
For machines with 16GB or more you could argue if swap is useful anyway except from hibernation maybe.

Revision history for this message
Alexander Petcoglo (rckt) wrote :

Made a fresh install recently and today bumped into heavy lags running a react native app on an Android emulator. Previous 16.04 install had 8 gigs swap and I had no issues with that. It never got full. I find the decision to lower it to 1Gb terrible, especially not giving an option or even a warning during the installation process.

Revision history for this message
Sean Horan (spatrickha) wrote :

I totally agree that a 1 GB default is terrible.

The problem is invisible to users who don't know how to deal with Linux memory management.

The 6 GB laptop I have becomes unusable after a period of average browsing, even with Chrome's tab suspender. There's no warning that people are out of memory, there's just sluggishness and even error notifications that have internal failures. There is no practical indication--or remedy--to the less technically-inclined users that the machine is out of memory.

Revision history for this message
Phillip Susi (psusi) wrote :

Your issue is that you need more memory, not that you do not have enough swap. The system grinds to a halt because swap is *really* slow. You need enough memory so that you don't have to swap.

Revision history for this message
Luciano Glavas (user.one) wrote :

Also installed 18.04 with encryption and LVM on my laptop through the GUI installation. And got ~1GB swap. The process "kswapd0" started take all my CPU and made my new installed laptop freeze/hang. When the process swapped/worked no space left on the allocated swap memory area.

Cant really believe that today this bug report is 4 months old and nothing has happened to prevent others like me to experience this. :)

Revision history for this message
Dave Long (longwave) wrote :

I also agree that this 1 GB default is terrible. I have 16 GB RAM (maximum allowed on this laptop) and on Ubuntu 16.04 I had 8 GB swap and never noticed any performance issues. Now I reinstalled Ubuntu 18.04 from scratch and ended up with this 1 GB default, once I have a few Docker containers running, an IDE, and lots of tabs open in Chrome or Firefox, then I start getting slowdowns, sometimes to the point that the machine grinds to a halt and the only solution is to power off and restart.

I have added a swap file as per https://askubuntu.com/questions/1031275/increase-swap-in-ubuntu-18-04-under-lvm-and-encrypted-file-system in the hope this will let me work as I did on Ubuntu 16.04, but this still could be improved for the out of the box experience.

Revision history for this message
OkropNick (okropnick) wrote :

The same problem here. LVM, whole disc encryption, 16GB RAM, 120GB SSD, 975MB swap. Any hints how to increase swap to 16GB without losing any data on ubuntu-vg?

Revision history for this message
Rick Timmis (rick-timmis) wrote :

We have 3 ASUS Laptops which have been re-imagined from Windows to Ubuntu 18.04, as part of an initial trial to move all 38 laptops to Ubuntu 18.04.

Every laptop had been installed with Encryption and LVM, via the installer, and each demonstrated lagging, and hanging at regular intervals throughout the day.
The pattern seemed to be when the browser was being used with multiple tabs. Initial I suspected perhaps a GPU driver issues, but all the laptops are using the Intel i915 drive appropraite to the chipset.

I did wonder about Swap, and so I took one of the laptops and re-installed it, without Encryption and LVM.

That laptop now appears to be working without lag or hang ( certainly last 24hrs )

However, I know that our executive will want Encryption for the data stored on these machines. My plan is to do manual partitioning, but I think that a this issues MUST be resolved for the standard Ubuntu install.

As a final note, I have an 2009 Intel laptop, with 3Gb of RAM which I use for Art and Music, Krita and Ubuntu Studio. To get the performance out of that, I created a separate 32Gb SWAP partition on the SSD. The speed of the SSD, when used unencrypted is fast enough to make the machine quite capable of handling hi resolution large scale images that can be as much as 16Gb.
Swap is still an incredibly powerful and valuable aspect of a Linux system, made more so because of the ever increasing performance of SSD Drives.

Hope this is useful info.,

Changed in partman-auto (Ubuntu):
status: Opinion → New
Revision history for this message
Humphrey van Polanen Petel (hpvpp) wrote :

I installed 16.04 on a hand-me-down laptop, because I need to support another system that is on 16.04 and it is easier for me to have an identical system
I installed 16.04, because later versions do not allow remote control using remmina (# 1790251, 1790249 & 1741027).
System is a 8Gb laptop with a 480Mb ssd.
Installer created a swap of 976Mb.
Install version was 16.04.5. (Note that my DVD with 16.04.3 creates a swap of appropriate size.)

The system will hang when used heavily, but does recover.

However, contrary to earlier comments, rebooting during such a 'freeze' is *not* guaranteed safe. On my system it has multiple times corrupted the file system which caused boot to fail and which required a run of "fsck /dev/sda1".

After I followed instructions found on help.ubuntu.com/community/SwapFaq, I now have an 8.3Gb swap and the system does not hang any more.

I spent two weeks before I realized that the problem was with the swap size.

In my opinion it is bad to change something as dramatic as swap-size. The installer should ask questions and give options.

*** This is not an "opinion" and consequently I have re-opened it ***

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in partman-auto (Ubuntu):
status: New → Confirmed
Revision history for this message
jhunken (jhunken) wrote :

The same problem here. Dell XPS 9370. LVM, whole disk encryption, 8GB RAM, 256GB SSD, 975MB swap. After an hour or two of "heavy" usage with various IDEs the laptop literally hangs because the CPU overheats, I believe due to RAM thrashing. I have to walk away from it for 15 mins to let it cool down. I'm lucky if I don't have to hard reboot it.

I finally added an 8GB /swapfile and the laptop is like a new machine (even though it *is* a new machine). No issues since.

tl;dr;
975MB swapfile renders my new laptop useless.

Revision history for this message
lsmith (smith-pooteeweet) wrote :

Are there some easy to follow instructions how to increase the partition size without breaking the encryption setup?

Revision history for this message
phanky5 (phanky5) wrote :

This is a major problem. I am now forced to do a full reinstall with proper swap allocation. This will set me back at least 1 full business day until I synced all my files again. There are not many common users out there who will go to that extend just to move over to Ubuntu.

If there is any solution to easily resize the swap partition on LUKS/ LVM instructions would be greatly appreciated.

Revision history for this message
sojusnik (sojusnik) wrote :

I manually add 4GB to the swapfile by

sudo swapoff /swapfile
sudo rm /swapfile
sudo fallocate -l 4g /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon -s
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

For further reading:
https://help.ubuntu.com/community/SwapFaq#How_do_I_add_a_swap_file.3F
https://askubuntu.com/questions/927854/how-do-i-increase-the-size-of-swapfile-without-removing-it-in-the-terminal/1039179#1039179
https://askubuntu.com/questions/1031275/increase-swap-in-ubuntu-18-04-under-lvm-and-encrypted-file-system
https://itsfoss.com/create-swap-file-linux/

Revision history for this message
lsmith (smith-pooteeweet) wrote :

that approach works only when using a swapfile .. but as noted in the OP, when using an LVM partition it doesn't work so easily.

Revision history for this message
phanky5 (phanky5) wrote :

Setting up a Swap file is easy enough. Yet it's not the same as having a Swap partition with the correct size. It brings problems down the road with hibernation. I believe the average user wants a large enough Swap partition out of the box with hibernation enabled. More advanced users who don't like this kind of setup can feel free to change this to whatever they want. It's important to make Ubuntu Desktop usable for the average person out of the box without any advanced trickery or important features like hibernation disabled.

Revision history for this message
sojusnik (sojusnik) wrote : Re: [Bug 1767299] Re: Ubuntu 18.04 Installer creates swap partition too small

Works fine here with LVM.

lsmith <email address hidden> schrieb am Mi., 18. Sep. 2019, 14:21:

> that approach works only when using a swapfile .. but as noted in the
> OP, when using an LVM partition it doesn't work so easily.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1767299
>
> Title:
> Ubuntu 18.04 Installer creates swap partition too small
>
> Status in partman-auto package in Ubuntu:
> Confirmed
>
> Bug description:
> Installed Ubuntu 18.04 final release.
>
> The disk is 512 Gigabyte, the RAM is 8 Gigabyte. The installer just
> gave me 979 Megabyte of space. I chose LVM to have an encrypted drive.
>
> Here are some details:
>
> free -h
> total used free shared buff/cache
> available
> Mem: 7,7G 4,0G 152M 399M 3,6G
> 3,0G
> Swap: 979M 0B 979M
>
>
> swapon --show
> NAME TYPE SIZE USED PRIO
> /dev/dm-2 partition 980M 0B -2
>
>
> cat /etc/fstab
> # /etc/fstab: static file system information.
> #
> # Use 'blkid' to print the universally unique identifier for a
> # device; this may be used with UUID= as a more robust way to name
> devices
> # that works even if disks are added and removed. See fstab(5).
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> /dev/mapper/ubuntu--vg-root / ext4 errors=remount-ro 0
> 1
> # /boot was on /dev/sda2 during installation
> UUID=removed-id /boot ext4 defaults 0 2
> # /boot/efi was on /dev/sda1 during installation
> UUID=removed-id /boot/efi vfat umask=0077 0 1
> /dev/mapper/ubuntu--vg-swap_1 none swap sw 0
> 0
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/partman-auto/+bug/1767299/+subscriptions
>

Revision history for this message
phanky5 (phanky5) wrote : Re: Ubuntu 18.04 Installer creates swap partition too small

For reasons stated further above I like to propose changing the status of this bug to critical.

I eventually managed to setup a swap file and enable hibernation. The following steps are copy pasted together from various different websites. Here are the changes I have made:

First find out how large your swap file should be. There are several recommendation tables you can find on Google. Adjust the needed size of the swap file below to your needs.

Setup swap file:

sudo swapoff -a # Turn off all swap space.
sudo rm /swapfile # Delete current swap file.
sudo dd if=/dev/zero of=/swapfile bs=1M count=16384 # Make a new 16GB swap file. (Adjust to your needs)
sudo chown root:root /swapfile # Set owner to root, group root
sudo chmod 0600 /swapfile # Set permission to root
sudo mkswap /swapfile # Convert file to swap format
sudo swapon /swapfile # Enable

Enable to swap file on boot. Add the following line to /etc/fstab using your favorite editor:
/swapfile none swap sw 0 0

Enable hibernation:
sudo apt install uswsusp
sudo apt install hibernate

Test if hibernation works with this command:
sudo hibernate

If everything looks good continue by changing the hibernation engine to use the hibernate command. Edit hibernation service:
sudo systemctl edit systemd-hibernate.service

Paste the following code:
[Service]
ExecStart=
ExecStartPre=-/bin/run-parts -v -a pre /usr/lib/systemd/system-sleep
ExecStart=/usr/sbin/s2disk
ExecStartPost=-/bin/run-parts -v --reverse -a post /usr/lib/systemd/system-sleep

Next update systemd:
sudo systemctl daemon-reload

Now you should be able to hibernate with the default system command:
sudo systemctl hibernate

Enable hibernation in the UI by following this guide:
http://ubuntuhandbook.org/index.php/2018/05/add-hibernate-option-ubuntu-18-04/

Revision history for this message
Mike m (mjm3413) wrote :

I may have missed it, but I have encrypted SSD and want to hibernate. I think I read that I have to use bigger encrypted swap partition (not file) and that it needs to have user-entered password. Don't think I found anything that had how to do all that together. I'm new to Linux, so any help is appreciated!

Revision history for this message
Edward Newman (edwardnewman) wrote :

I have a number of users who want larger swap partitions. Is there an update on how to achieve this on first install? Only custom preseed steps?

Revision history for this message
phanky5 (phanky5) wrote :

@mjm3413 The steps I outlined further above work just fine with an encrypted SSD.

information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Francisco Marques (tofran) wrote :

I'm sorry, I had no intention to change the visibility of the bug, I have reverted the change.

Regarding this bug, the average user should not, in any way have such a low amount of swap by default. I think this bug is very relevant and therefore an Importance should be assigned.

I have this bug installing 18.04.3 LTS via the quick setup with full disk encryption on both Lenovo idealpad 720 and Thinkpad 13.

Revision history for this message
Piotr Morgwai Kotarbiล„ski (morgwai) wrote :

- high memory systems for desktop machines are rare: most people using desktop version of ubuntu have way more disk than RAM.
- it is quite hard for a non-expert user who just wants a secure system with encrypted disk and use hibernation to resize lvm partitions: there's no GUI tool for it, so he needs to learn to use several lvm command line tools
- although there are good reasons not to enable hibernation by default, it should be easy to enable it manually later as it is important for many laptop users.
- moreover, installer could be simply detecting if a given system is a high-memory one instead of applying strict defaults blindly: swap space could be capped for example with min(2*RAM, 0.2*disk)
- if taking into consideration disk size when deciding swap size is too difficult for any reason, there could be at least an option in the installer *GUI*: dealing with preseeding is also difficult for an average user for whom creating a bootable pendrive was already a challenge

Revision history for this message
Ewon (ewon-c) wrote :

I tested Ubunto 20.04 daily today, and it seems the installer was still not fixed. A 4GB VirtualBox would only get 1GB as swap in encrypted LVM mode.

Revision history for this message
dave (doobie-inflopipe) wrote :

There seems to be a misconception on the part of the devs that allowing too much swap will result in machines under memory pressure suffering worse than if they simply ran out of memory and the kernel's OOM killer rescued the system. Running out of memory is almost *never* better than hitting swap. Depending on the application, it is possible to swap out vast swaths of system memory to make room for temporary spikes in memory allocation. It is also customary for the kernel to swap out about 1GB of memory that will most likely never be accessed again after boot. This cannot be done when the max swap is 1GB. Factor in fast SSD's and VNME's that come much closer to the performance of RAM, and a system can remain quite usable even if it should develop a swap storm. The bottom line is that this should be a user-tunable in the installer and not something users have to resort to swapfiles to work around.

Revision history for this message
Vitaly Larchenkov (vitaly-user) wrote :

Found same issue on Ubuntu 20.04.

I install on thinkpad with 16GB memory and ubuntu installer creates 1GB swap. I heavily use virtualization for containers. So with vm.swappiness=60 machine becomes unusable pretty fast, with such small swap, swappiness should be definitely smaller. Actually was the same on previous releases and I do not understand why developers choose this defaults.

Also I install on laptop with 40GB ram, problem more obvious, ubuntu start swapping when you have about 24 gigs free and of course freezes with 1GB swap, so simple reboot becomes a problem.

So I think calculations should be more smart then just create 1GB swap. At least few rules for list of common ram configurations like ram<=4GB ram<=8GB ram<=16GB ram<=32GB etc.

And it's take a lot of time if you use encrypted LVM to expand swap.

Revision history for this message
Victor Sergienko (singalen) wrote :

Really. After I installed a new machine with an encrypted rootfs, I find out that it crashes under load, because with 64G memory it only has 1G swap? Why add swap at all and give a false sense of safety?

This default will cost me too much time to fix.

And it's happening on every single computer where installer is allowed to use defaults. I should remember that in 2020, when user machines have at least 8G, it still cannot be trusted to do a reasonable disk partitioning.

Revision history for this message
Hany Said EL-Nokaly (hany-elnokaly) wrote :

Why is this not fixed since 2018-04-27 !!! and I have to face the same problem after installing Ubuntu 20.04.1 ?

Do Ubuntu desktop developers only do theme CSS ?

Changed in partman-auto (Ubuntu):
assignee: Dimitri John Ledkov (xnox) → nobody
Revision history for this message
Victor Sergienko (singalen) wrote :

See above why it's not fixed. It's b/c xnox doesn't want to accept that his fix for #1351267 was less than ideal, so he labelled the problem "opinion".

Revision history for this message
Hany Said EL-Nokaly (hany-elnokaly) wrote :

Then, how can we get any other developer attention to fix this xnox's incompetent swap calculation algorithm?

summary: - Ubuntu 18.04 Installer creates swap partition too small
+ Ubuntu 18.04-20.04 Installer creates swap partition too small
Revision history for this message
Francisco Marques (tofran) wrote :

It looks like this is still a problem in Ubuntu 20.
Can we remove 18.04-20.04 from the title?

Revision history for this message
Mauro (mauromol) wrote :

Upgraded to Kubuntu 20.04 from Linux Mint 18.3 (based on Ubuntu 16.04) just a couple of days ago, I already got one OOM and another time so close. I have 16 GB of RAM and I need to open many heavy programs. Never had any problem to handle this with my SSD and my previous 16.04 system, with highly acceptable results.
I can't see how this 1 GB swap file "by default" can be considered an improvement. If you don't want systems to swap, just remove the swap as a whole, why 1 GB?

Revision history for this message
MikeD (mike-dymott) wrote :

I experienced the same issue on a fresh default install of 20.04 on a laptop with 4GB RAM (LVM, whole disk encryption...). Applications started (practically) freezing after some pretty light domestic use (a few Chrome tabs, Spotify...), with the memory and 1GB swap at 100%.
Setting up a 4GB swap file (the recommended size in my case) as described above has solved the issue.
However it seems a shame for Ubuntu that a default install doesn't seem to be appropriate for getting decent (or even acceptable) performance from what I guess is a pretty standard set-up. Why not use the recommended swap size by default?

Revision history for this message
M Mueller (kbreiling) wrote :

Why is this still a problem?

I downloaded a fresh 20.04 iso installed and only got 1GB Swap

Revision history for this message
Mauro (mauromol) wrote :

Even Debian 11 does this. I really can't understand the rationale behind this choice. I second what MikeD says: systems with 4-8 GB and just 1 MB of swap file will freeze quite rapidly with normal home usage (e-mail, Internet browser, a couple of productivity programs). Really bad experience out-of-the-box...

Revision history for this message
Mystica555 (mystica) wrote :

Can't we just get an option for swap size setting, still allowing _all_ other partition options to be automatic?

Like, I want to install to ZFS for a server. So I have to use the Desktop disk. And even for my laptop that i WANT TO HIBERNATE, all the bloody installer ever gives me is 2 GB.

I need at least 24 gigabytes.
Not TWO.
Yes 24.

Why 24? I only have 8 gigs of ram. But that might all be used. And I might have a ton of things that I've got open but not "active" using another 10 gigs of swap. Well thats 18 gigs.
Now I want to hibernate. The 8 gigs chip, plus 10 gigs swap has to go somewhere. 24 should give enough headroom in that case. It might not in the case of if I were using 16 gigs of something swapped. But the system would be laggy enough before that moment.

I just don't want to crash "out of memory"
I DO want to hibernate.

MAKE THIS A SETTING REGARDLESS OF INSTALL PARTITIONING TYPE (or make ZFS an option for manual setup without forcing a user to create the more than 20 datasets themselves...)

Revision history for this message
Saptarshi Roy (sroypc) wrote :

This is still unresolved.

Revision history for this message
Saptarshi Roy (sroypc) wrote :

This page includes the instructions to change the size of the encrypted swap file.

https://romainpellerin.eu/how-to-resize-an-encrypted-swap-partition-lvm.html

There should be a GUI way to accomplish this.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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