Implementation of zswap

an incubator for software projects


Moderator: Forum moderators

Post Reply
User avatar
amethyst
Posts: 2418
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 506 times

Implementation of zswap

Post by amethyst »

I'm interested in this because it could speed up the use of a swap file or swap partition which potentially could be very beneficial for low end, low RAM machines. I think it may also be a safer option instead of zram as far as stability of the system is concerned. Any ideas?

User avatar
bigpup
Moderator
Posts: 6993
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 911 times
Been thanked: 1528 times

Re: Implementation of zswap

Post by bigpup »

Maybe all you do, is add this to the end of the kernel or Linux line, in the boot loader menu entry. (Depending on which one is in the boot loader entry)

From kernel.org
https://www.kernel.org/doc/html/v4.18/vm/zswap.html

Zswap is disabled by default but can be enabled at boot time by setting the enabled attribute to 1 at boot time. ie: zswap.enabled=1.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
amethyst
Posts: 2418
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 506 times

Re: Implementation of zswap

Post by amethyst »

zram can't co-exist with zswap (it will be in conflict as I understand it) so with the current setup it won't work as the default is now zram. So if someone wants to use zswap instead there needs to be changes to rc.sysinit I think and probably also changes to kernel "instructions" when the kernel is compiled. So we are waiting for further input.

Clarity
Posts: 3829
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1628 times
Been thanked: 522 times

Re: Implementation of zswap

Post by Clarity »

How would this improve what is referred to as low-ram PCs? I am probably wrong, but the idea of swap is a mapping for RAM extension. I foresee zswap as an improvement, maybe for PCs with lots of RAM much more than the OS requires to run in full-load. I am probably very wrong as I reach for zswap case use.

Curious

User avatar
amethyst
Posts: 2418
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 506 times

Re: Implementation of zswap

Post by amethyst »

Clarity wrote: Mon Jan 15, 2024 8:04 am

How would this improve what is referred to as low-ram PCs? I am probably wrong, but the idea of swap is a mapping for RAM extension. I foresee zswap as an improvement, maybe for PCs with lots of RAM much more than the OS requires to run in full-load. I am probably very wrong as I reach for zswap case use.

Curious

Google zswap and read up a little. i did the same.

Clarity
Posts: 3829
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1628 times
Been thanked: 522 times

Re: Implementation of zswap

Post by Clarity »

I did. And I do understand swap and page dataset needs and use.

This requires some ram...similar to zram.

Dont get me wrong, as I ask to try to wrap my head around the impact on low-ram PCs. The large RAM PCs, offer a good case where, to me, its easy to see how the systematic structure of zswap could offer a benefit when system swap decisions will be made and this would/could be a fast improvement.

Better minds of the internals of the OS than mine are in order.

Edit
BTW: This webpage helped me

Last edited by Clarity on Mon Jan 15, 2024 8:25 am, edited 2 times in total.
User avatar
amethyst
Posts: 2418
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 506 times

Re: Implementation of zswap

Post by amethyst »

Clarity wrote: Mon Jan 15, 2024 8:14 am

I did. And I do understand swap and page dataset needs and use.

This requires some ram...similar to zram.

Dont get me wrong, as I ask to try to wrap my head around the impact on low-ram PCs.

I think it will be as effective as zram for low RAM machines (this is also what I've read) but additionally I think it will be a safer method than zram in general as far as low ram machines are concerned (as mentioned earlier in the thread). I've also read that you can set a specific size for the swap cache which could be useful. Anyways, I do not know much about this so are looking forward to input from others who know more.

Post Reply

Return to “Development”