[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: provant debian 9: swapfile



El 22/04/17 a las 18:40, Narcis Garcia escribió:

> Amb els navegadors que utilitzo no se m'obre res del lloc web
> blog.surgut.co.uk

Bàsicament diu que avui en dia els sistemes van sobrats de RAM:



By default, in Ubuntu, we usually create a swap partition.

Back in the day of 4MB RAM cards this made total sense, as the ration of
RAM to disk space, was still very low. Things have changed since.
Server, desktop, embedded systems have migrated to newer generations of
both RAM and persistent storage. On the high performance side of things
we see machines with faster storage in the form of NVMe and SSD drives.
Reserving space for swap on such storage, can be seen as expensive and
wasteful. This is also true for recent enough laptops and desktops too.
Mobile phones have substantial amounts of RAM these days, and at times,
coupled with eMMC storage - it is flash storage of lower performance,
which have limited number of write cycles, hence should not be overused
for volatile swap data. And there are also unicorns in a form of high
performance computing of high memory (shared memory) systems with little
or no disk space.

Today, carving a partition and reserving twice the RAM size for swap
makes little sense. For a common, general, machine most of the time this
swap will not be used at all. Or if said swap space is in use but is of
inappropriate size, changing it in-place in retrospect is painful.

Starting from 17.04 Zesty Zapus release, instead of creating swap
partitions, swapfiles will be used by default for non-lvm based
installations.

Secondly, the sizing of swapfiles is very different. It is no more than
5% of free disk space or 2GiB, whichever is lower.

For preseeding, there are two toggles that control this behavior:

    d-i partman-swapfile/percentage string 5
    d-i partman-swapfile/size string 2048

Setting either of those to zero, will result in system without any swap
at all. And one can tweak relative integer percentage points and
absolute limits in integer percentage points or MiB.

On LVM based installations, swap logical volumes are used, since
unfortunately LVM snapshots do not exclude swapfile changes. However, I
would like to move partman-auto to respect the above proposed 5%-or-2GB
limits.


Reply to: