Skip to content

Feat: Zram algorithm config#4042

Merged
svartkanin merged 15 commits into
archlinux:masterfrom
h8d13:dot-algo
Dec 30, 2025
Merged

Feat: Zram algorithm config#4042
svartkanin merged 15 commits into
archlinux:masterfrom
h8d13:dot-algo

Conversation

@h8d13

@h8d13 h8d13 commented Dec 28, 2025

Copy link
Copy Markdown
Contributor

Continuation to PR #4027

Would allow to set the algo of zram directly. Available ones can be checked using

cat /sys/block/zram0/comp_algorithm

We could however extend this to support re-compression as seen on the wiki

/etc/systemd/zram-generator.conf

[zram0]
compression-algorithm = lzo-rle zstd(level=3) (type=idle)

But for now already giving an option looks better.

untitled.mp4

This also fixes a quirk where the default highlighted value was "no" causing an extra interaction for sane default.

@h8d13 h8d13 requested a review from Torxed as a code owner December 28, 2025 10:02
Comment thread archinstall/lib/args.py Outdated
packages: list[str] = field(default_factory=list)
parallel_downloads: int = 0
swap: bool = True
swap: bool | dict[str, Any] = True

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could swap Any here if possible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dict[str, str] ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yepp that looks correct (I say just looking at the code, haven't tested it)

@h8d13 h8d13 Dec 28, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will also test later tonight 👍

I like this (would) make the option in menu more useful than yes/no :D

Comment thread archinstall/lib/args.py Outdated
Comment thread archinstall/lib/global_menu.py Outdated
Comment thread archinstall/lib/interactions/system_conf.py Outdated
Comment thread archinstall/lib/args.py Outdated
Comment thread archinstall/lib/args.py Outdated
Comment thread archinstall/lib/args.py Outdated
Comment thread archinstall/lib/installer.py Outdated
Comment thread archinstall/lib/interactions/system_conf.py Outdated
Comment thread archinstall/lib/interactions/system_conf.py Outdated
Comment thread examples/config-sample.json Outdated
@h8d13

h8d13 commented Dec 29, 2025

Copy link
Copy Markdown
Contributor Author

Sorry about the messy commits, learning about the full structure still.

Really do appreciate all the feedback from both of you. I will do more testing today. If you have the chance to look at the LVM branch I'd be really grateful too.

@Torxed

Torxed commented Dec 29, 2025

Copy link
Copy Markdown
Member

Sorry about the messy commits, learning about the full structure still.

No worries, we squish commits to one right before merging - so it'll look like one commit in the end :)

Comment thread tests/test_args.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be test the true case with a proper algorithm

@svartkanin svartkanin merged commit 2954e43 into archlinux:master Dec 30, 2025
9 checks passed
@h8d13 h8d13 deleted the dot-algo branch January 3, 2026 10:43
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

Successfully merging this pull request may close these issues.

3 participants