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

Zswap enabled by default - Could give a bit more reliability with more tabs #51

Open
andiohn opened this issue Oct 16, 2024 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@andiohn
Copy link

andiohn commented Oct 16, 2024

Add these to the cmdline.txt when installing.

zswap.enabled=1 zswap.compressor=lz4 zswap.zpool=z3fold

This will allow compressable objects to be compressed and stored compressed in ram. On a raspberry pi 3, it shouldn't effect performance much at all. It's actually recommended by Ubuntu. See this:

https://www.cnx-software.com/2022/01/13/ubuntu-22-04-zswap-raspberry-pi-4-2gb-ram/

I'm going to try it to see if my once a day reboot will still be ok. Right now I have a video file within a website and it doesn't last the day right now.

@andiohn
Copy link
Author

andiohn commented Oct 16, 2024

Here's more details: MichaIng/DietPi#6205

@andiohn
Copy link
Author

andiohn commented Oct 16, 2024

Here's some more reading. https://ikarus.sg/using-zram-to-get-more-out-of-your-raspberry-pi/
This one was very informative.

@andiohn
Copy link
Author

andiohn commented Oct 16, 2024

Ok, so enabling it on a 4GB pi 3 immediately makes it more responsive. I did the top command.

zswap.enabled=1
zswap.compressor=lz4
zswap.zpool=z3fold

@debloper debloper added enhancement New feature or request good first issue Good for newcomers labels Oct 19, 2024
@debloper debloper added this to the .NEXT milestone Oct 19, 2024
@debloper
Copy link
Owner

Thanks, I can't verify this myself (don't have a Pi3 or other lower powered RPi at hand), but I realize how this can give a performance boost for them.

This would be a toggle on the dashboard in the next release, for anyone who want to opt-in.

@andiohn
Copy link
Author

andiohn commented Nov 29, 2024

The bottom guy has more details here on an updated method for zswap and log2ram as well.

https://ikarus.sg/reduce-sd-card-wear-on-your-raspberry-pi-with-zram-config/

I think it'd be worth figuring out how we'd like this implimented because it will probably help keep these systems running longer without messing about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants