Users will be able to opt out of using Swap

Dec 20, 2016 23:26 GMT  ·  By

Canonical's Dimitri John Ledkov announced recently plans to drop Swap partitions for new installations of upcoming Ubuntu Linux operating system releases, and replace them with so-called Swapfiles.

Not that this is big news for most of us who own computers with SSD or NVMe flash drives and a lot of RAM (system memory), but we thought it might be of interest to those who will attempt to install future versions of Ubuntu on PCs from ten years ago. If you're not aware, Swap partitions or space is used when the amount of RAM is full.

Many years ago, creating a Swap partition for a new installation of a GNU/Linux distribution was mandatory, but that changed in time as technology advanced a lot. Even the cheapest laptop you can buy today comes with at least 4GB RAM, which is more than enough for office work and basic computing, such as web browsing.

But these days there's no need for a Swap partition if you have between 2GB and 4GB of physical memory on your personal computer. Even if you create one, chances are it won't be used by the respective Linux-based operating system you've installed. That's why Canonical decided to drop Swap partition for new installations of Ubuntu.

Swap partitions are being replaced with Swapfiles in Ubuntu 17.04

As you might know or not, Canonical is currently developing the Ubuntu 17.04 operating system, codenamed Zesty Zapus, due for release on April 13, 2017. And it looks like one of the new features implemented will be support for Swapfiles instead of the traditional Swap partition that was automatically created during installation.

"Starting from 17.04 Zesty Zapus release, instead of creating swap partitions, swapfiles will be used by default for non-lvm based installations," said Dimitri John Ledkov, Software Engineer at Canonical. "Secondly, the sizing of swapfiles is very different. It is no more than 5% of free disk space or 2GiB, whichever is lower."

As you can see, these new Swapfiles will be automatically used for non-LVM (Logical Volume Management) installations of Ubuntu. Additionally, Canonical will ensure that users are in full control of their installations and will allow them to set a couple of parameters to zero if they don't want to use Swap.

On the other hand, if you plan an LVM-based installation of Ubuntu, Swap logical volumes will be automatically used as LVM snapshots don't exclude swapfile changes. These changes are coming to Ubuntu 17.04 (Zesty Zapus) as well as future versions of the Linux-based operating system.