Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Swap size in debain 12

188 views
Skip to first unread message

Erwan David

unread,
Aug 12, 2023, 9:50:06 AM8/12/23
to
Installing a new debian 12 I see that the installer setups a 1G swap on
a 24G RAM laptop.

Is the hibernation out of swap now ? (I chose to have a biigger swap,
but I find it strange)

--
Erwan David

David Wright

unread,
Aug 12, 2023, 10:30:06 AM8/12/23
to
The arguments are rehearsed in:

https://wiki.debian.org/Swap

Cheers,
David.

Erwan David

unread,
Aug 12, 2023, 10:40:06 AM8/12/23
to
Not completely : I think I will open a bug (wishlist) against the
installer : it is complicated to change swap size when you must reduce
root partition size to do this. So at least a question "will you use
suspend/hibernate" at install time would be useful (I did not find in
the installer how to change the sizes so I had to delete bot then
recreate them, and it would have been complicated on a machine already
installed)

--
Erwan David

Andrew M.A. Cater

unread,
Aug 12, 2023, 10:50:06 AM8/12/23
to
Suspend still works on 1G swap, at least for me.

Hibernate is more complicated: some of the newest laptop chipsets don't
seem to hibernate in the same way as older models.

If you wanted to hibernate fully on some models with smaller amounts of
disk - eg the Chromebooks with 32G or 64G mmc - that would be much harder
too.

You should get the opportunity to check partitioning even on the standard
install and you can then switch to manual partitioning to do this.
The partitioning step comes well before software is installed to the disk.

All the very best, as ever,

Andy CateIf you wanted to hibernate fully on some models with smaller amounts of
disk - eg the Chromebooks with 32G or 64G mmc - that would be much harder
too.

You should get the opportunity to check partitioning even on the standard
install and you can then switch to manual partitioning to do this.
The partitioning step comes well before software is installed to the disk.

All the very best, as ever,

Andy Cater

Andy Smith

unread,
Aug 13, 2023, 9:20:06 AM8/13/23
to
Hello,

On Sun, Aug 13, 2023 at 01:38:35PM +0100, Darac Marjal wrote:
> If it's useful, you *can* Hibernate to a swap file.
> https://wiki.debian.org/Hibernation/Hibernate_Without_Swap_Partition It
> looks a little flaky, though, because you need to tell the kernel how many
> bytes into a device to find the file (which, if you defrag your filesystems
> often could be a problem, but generally speaking files don't move around on
> disk much).

Swap files are fine and their contents never move around on disk.
Not by normal use, anyway.

However, if you create one for the first time when the filesystem is
quite full then there may not be enough contiguous space for the
swap file so it may start off fragmented into several pieces, which
is not optimal.

This isn't usually a concern because:

- Most people that are going to use a swap file set it up quite
early on when the file system that it's on is pretty empty.

- Swap is inherently slow anyway (even to SSD) so some fragmentation
isn't going to change much.

Once the actual swap file is created it is a static chunk of data
that doesn't move around as its IO doesn't go through the filesystem
that it is on.

Swap files are a good solution when you later decide to do
hibernation on a machine that either doesn't have a swap partition
or doesn't have one big enough for the task.

Cheers,
Andy

--
https://bitfolk.com/ -- No-nonsense VPS hosting
0 new messages