How to disable swap on CentOS Stream release 8?

Issues related to applications and software problems and general support
Post Reply
search4workingdistro
Posts: 66
Joined: 2020/11/18 10:52:19

How to disable swap on CentOS Stream release 8?

Post by search4workingdistro » 2022/05/21 00:49:13

And still be able to hibernate


lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: How to disable swap on CentOS Stream release 8?

Post by lightman47 » 2022/05/22 15:22:24

I am likely wrong wrong but isn't writing memory to swap HOW hibernate works?
:?:

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to disable swap on CentOS Stream release 8?

Post by TrevorH » 2022/05/22 16:56:33

I think you are correct, swap is a requirement for hibernation since it uses the swap to contain the hibernated RAM.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

search4workingdistro
Posts: 66
Joined: 2020/11/18 10:52:19

Re: How to disable swap on CentOS Stream release 8?

Post by search4workingdistro » 2022/05/23 09:21:42

TrevorH wrote:
2022/05/22 16:56:33
I think you are correct, swap is a requirement for hibernation since it uses the swap to contain the hibernated RAM.
Then how it works (somehow it does!) if the system is to hibernate but the swap if already half full and there is no enough space there to store the entire RAM there?


User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to disable swap on CentOS Stream release 8?

Post by TrevorH » 2022/05/26 22:02:31

One quick google later...

Arch Wiki: In order to use hibernation, you need to create a swap partition or file
Debian Wiki: https://wiki.debian.org/Hibernation also says swap is required.

It's required.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: How to disable swap on CentOS Stream release 8?

Post by lightman47 » 2022/05/30 18:48:50

{Curiosity only}
Then how it works (somehow it does!) if the system is to hibernate but the swap if already half full and there is no enough space there to store the entire RAM there?
I then wonder if it only stores the USED portion of RAM.

How were you able to determine that swap was half full at the time you chose to hibernate? Perhaps the system releases swap space during the hibernate "shutdown". (I don't pretend to know).

- just random thoughts.

Anyway, as TrevorH mentioned hibernate requires swap, regardless of 'how the magic is done'.

search4workingdistro
Posts: 66
Joined: 2020/11/18 10:52:19

Re: How to disable swap on CentOS Stream release 8?

Post by search4workingdistro » 2022/06/02 21:49:53

lightman47 wrote:
2022/05/30 18:48:50
Anyway, as TrevorH mentioned hibernate requires swap, regardless of 'how the magic is done'.
Well, then I have a bit less ambitious question. How can I prohibit moving all processes but browser to swap?

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: How to disable swap on CentOS Stream release 8?

Post by jlehtone » 2022/06/03 08:01:30


Post Reply