Page 1 of 1
Implementation of zswap
Posted: Sun Jan 14, 2024 6:06 pm
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?
Re: Implementation of zswap
Posted: Mon Jan 15, 2024 12:33 am
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.
Re: Implementation of zswap
Posted: Mon Jan 15, 2024 6:19 am
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.
Re: Implementation of zswap
Posted: Mon Jan 15, 2024 8:04 am
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
Re: Implementation of zswap
Posted: Mon Jan 15, 2024 8:09 am
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.
Re: Implementation of zswap
Posted: Mon Jan 15, 2024 8:14 am
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
Re: Implementation of zswap
Posted: Mon Jan 15, 2024 8:22 am
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.