Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable zswap usage if swap exists #1490

Open
ArmynC opened this issue Jul 22, 2024 · 2 comments
Open

Enable zswap usage if swap exists #1490

ArmynC opened this issue Jul 22, 2024 · 2 comments

Comments

@ArmynC
Copy link

ArmynC commented Jul 22, 2024

A nice and quite unique addition would be the integration of a zswap toggleable option if Agama installer creates a swap partition/file or the user choose its manual swap.

In simpler terms, zswap could be a mix of a zram with swap, as it caches on ram (speedier temp memory) the page files, thus avoiding much i/o hard drive wear (SSD wary!). The difference resides in the fact that zswap can use the hard drive swap if necessary, by adding the uncompressable data or, in the case of a full ram.

On a key, "a basic 8 or 16 GB on disk without swap would be enough" isn't true all fhe time. As a scenario, a LLM system would consume that rather quickly. Secondly, by using an editing workspace alongside gaming and web, would touch the upper limit too.

By looking up the documentation (https://docs.kernel.org/admin-guide/mm/zswap.html), I can think that over time, the default parameters got to a desirable state, in which no custom config would be mandatory, beside the zswap.enabled=1 and perhaps if necessary, per case, a max_pool_percent.

Maybe due to the approaches on this matter, a disabled by default toggleable option would suffice. If the user should choose it, it is a click away.

Moreover, if the installation has no swap active, a zram option could be added too; a note on this one, some of opensuse community isn't that keen on it, because of its nature, though it is enabled by default on multiple distros.

@ancorgs
Copy link
Contributor

ancorgs commented Jul 29, 2024

Interesting suggestion. I may need to investigate a bit further.

Due to other tasks, this will likely not make it for Leap 16.0 (the first distribution expected to offer Agama as a supported installer). But adding it for Leap 16.1 sounds interesting.

@jreidinger
Copy link
Contributor

Just note, Agama already by default uses zramswap to work on low memory machines:
https://github.com/openSUSE/agama/blob/master/live/src/config.sh#L60

I expect in this issue you talk about enabling zswap on target system, right? As agama cannot access swap on disk until it creates one, which is quite late.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants