zram swap support for the PBP; aka: "how to download more RAM" - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114) +--- Thread: zram swap support for the PBP; aka: "how to download more RAM" (/showthread.php?tid=8812) Pages:
1
2
|
zram swap support for the PBP; aka: "how to download more RAM" - Arglebargle - 01-16-2020 Hey all, Last month I posted a simple zram-swap script that I wrote for my PBP on IRC for people to use. I took some time to package it and make it "release worthy" and pushed it to github with updates today: https://github.com/foundObjects/zram-swap This makes a huge difference if you're memory constrained on your PBP, and even if you aren't I encourage you to check it out simply to avoid the NAND wear of swapping to your eMMC when you eventually do need to swap. I also added a fixed-size swap feature for people who know ahead of time exactly how much swap they want, so if you're doing something like building GCC with -lto on the PBP and need 10+G swap I've got you covered: just set "_zram_fixed_size=10G" in the /etc/default/zram-swap config file along with your prefered swap algorithm and you're good to go. Yes, you can use lzo-rle. README.md: Code: # zram-swap RE: zram swap support for the PBP; aka: "how to download more RAM" - Tazdevl - 01-17-2020 Nice!!! RE: zram swap support for the PBP; aka: "how to download more RAM" - IoSer - 01-17-2020 Thank you. I find it very useful for Gnome. I thought I'd use it too. RE: zram swap support for the PBP; aka: "how to download more RAM" - as400 - 01-17-2020 @Arglebargle thanks. Just great.
RE: zram swap support for the PBP; aka: "how to download more RAM" - james64 - 01-21-2020 Thanks. I've applied this. I had a bad day yesterday after about 10 tabs in chrome and swapping while syncing about 1GB to my storage at the same time. Looking forward to see how it works. RE: zram swap support for the PBP; aka: "how to download more RAM" - Arglebargle - 01-21-2020 Copying your question from PM here so everyone can benefit from the answer- james64 Wrote:I just installed zram yesterday. Thanks! That'll depend on the swap priority set on the default swapfile. Swaps with a higher priority are used first, when the high priority swap is full then lower priority swap will be used. Check your existing swaps by running `swapon` with no arguments or `cat /proc/swaps` to see the priorities: Code: root@pinebookpro:~/work/zram-swap# cat /proc/swaps I'm pretty sure the default swapfile has a priority of 1, 0 or -1; I can't remember which. The zram-swap script sets priority 5 which should be higher. You can safely disable the default swapfile and remove it. RE: zram swap support for the PBP; aka: "how to download more RAM" - james64 - 01-24-2020 ah. i didn't see you post since my previous post here so pm'd. Cool. I confirmed it was working yesterday once I got back to the pinebook. thanks RE: zram swap support for the PBP; aka: "how to download more RAM" - llsf - 01-24-2020 I've made a quick PKGBUILD for it, if anyone else has some use for it. Code: pkgname=zram-swap-git RE: zram swap support for the PBP; aka: "how to download more RAM" - icecream95 - 01-24-2020 I use zram with zstd, and it usually compresses RAM to better than half the size. For kernel compiling, I resize /tmp to 8G (sudo mount -o remount,size=8G /tmp) then do an overlay mount over the kernel source, so that all the build files are in RAM. RE: zram swap support for the PBP; aka: "how to download more RAM" - wasgurd - 02-01-2020 (01-21-2020, 11:39 PM)Arglebarg Wrote: What size of zram do you recommend? |