why ubuntu LTS installs all in a single partition?

Christofer C. Bell christofer.c.bell at gmail.com
Sat Aug 3 23:20:02 UTC 2013


On Sat, Aug 3, 2013 at 9:28 AM, Liam Proven <lproven at gmail.com> wrote:

> On 3 August 2013 04:13, Christofer C. Bell <christofer.c.bell at gmail.com>
> wrote:
> >
> > While it may work for you, a blanket recommendation to have no swap
> should
> > be avoided.  Please look into how Linux handles memory allocations
> > (specifically look into vm.overcommit_memory and vm.overcommit_ratio).
>  For
> > modern Linux systems with large amounts of RAM, a good rule of thumb is
> to
> > have 2GB of swap.
>
> Did you get to the part about how I have installed a daemon to
> dynamically add swap *files* as required?
>

I'm afraid I didn't see that.


> The main use for a swap partition today is hibernation. It's a server.
> I don't hibernate servers. I don't hibernate desktops, either. So I
> don't put swap partitions on servers or desktops.
>

This is not true.  Please see my response to Mauro which I will quote here:

"For example, let's say you have 8GB of RAM in your system.  Currently, 6GB
of RAM are in use (leaving 2GB free).  You want to start a process that
will use no more than 1GB of physical RAM when running, but will request
3GB of memory for itself, exceeding the availability of physical RAM by
1GB.  Without swap, this program will not start, and the kernel will give
you an insufficient memory error (ENOMEM).  With a 2GB buffer provided by
swap (so the system's total virtual memory size is 10GB), this program will
be able to request 3GB of RAM (as 4GB are available), be started, and
happily use the 1GB of RAM it really needs."


> Most modern PCs have more RAM fitted than they will ever need anyway.
> 8GB is the norm, 16GB is becoming frequent. Unless someone has very
> specific needs (e.g. editing very large media files, running multiple
> VMs), this is more RAM than most will ever require. On such systems,
> swap is an anachronism.
>

This is not true for the reasons stated above.  As one increases the RAM in
a system, it is much like one's salary increasing.  Much as your expenses
will rise to the level of your new salary, the memory requirements of your
system will rise to the level of physical RAM you have installed.  The 2GB
of swap provides a buffer in virtual memory that will allow you to actually
*use* all the physical RAM you have installed, as per the explanation I
provided above.

If you do not have a reasonable amount of swap in the system, any processes
that request more memory to be allocated than you have free *physically*
will not start, even if they do not need all the memory requested.  This
will leave RAM unused that could have been used for running that process.
Programs frequently request more memory than they actually need,
accommodating these requests by providing a larger amount of memory
(through virtual memory, even if you never intend the system to swap)
allows you to run more software in the physical RAM you have available.

-- 
Chris

"If you wish to make an apple pie from scratch, you must first invent the
Universe." -- Carl Sagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130803/987317a7/attachment.html>


More information about the ubuntu-users mailing list