... | ... | @@ -999,4 +999,21 @@ Alternative instructions to configure the systemd zram-generator service (Source |
|
|
|
|
|
> The limits given above matches the default limits (50 % of available memory or 8 GB in MB). Change the limits to your preference. Keep in mind that the system can become unstable if you set it too high. I suggest staying with the default factor of 0.5 and increasing the max size to match your available system memory. For example, set `max-zram-size=8192` if you have 16 GB of RAM.
|
|
|
|
|
|
2. > You can recreate the ZRAM device immediately without a reboot if you have enough physical memory to hold an uncompressed copy of all your currently compressed memory. The commands `free` and `zramctl` can help you determine the current memory pressure and compression ratio. Run the command `systemctl restart systemd-zram-setup@zram0.service` to recreate the ZRAM device without rebooting. However, the safest and quickest option is probably to save your work and reboot. |
|
|
\ No newline at end of file |
|
|
2. > You can recreate the ZRAM device immediately without a reboot if you have enough physical memory to hold an uncompressed copy of all your currently compressed memory. The commands `free` and `zramctl` can help you determine the current memory pressure and compression ratio. Run the command `systemctl restart systemd-zram-setup@zram0.service` to recreate the ZRAM device without rebooting. However, the safest and quickest option is probably to save your work and reboot.
|
|
|
|
|
|
Kyle Rankin posted steps on modifying the compression algorithm to gain more RAM.
|
|
|
|
|
|
Source:<https://puri.sm/posts/my-first-year-of-librem-5-convergence/>
|
|
|
|
|
|
> # Adding Extra RAM
|
|
|
>
|
|
|
> Zram is a feature built into the Linux kernel that allows you to trade some CPU resources for RAM. With zram, you allocate a certain amount of your RAM for the purpose, and the kernel then transparently compresses that RAM on the fly using a fast compression algorithm. The result in my case is a system that looks and acts like it has 1.5Gb of extra RAM available as a swap partition, but one that is faster than using a local swap file.
|
|
|
>
|
|
|
> To set this up, first I installed the `zram-tools` package. Then I edited the `/etc/default/zramswap` file to enable the compression algorithm that worked well on my Librem 5 and to tell it to use fifty percent of my available RAM as zram:
|
|
|
>
|
|
|
> ```
|
|
|
> ALGO=lzo
|
|
|
> PERCENT=50
|
|
|
> ```
|
|
|
>
|
|
|
> Then after a reboot (or just restarting the zramswap service), I had an extra 1.5Gb of RAM. Ever since I enabled zram I haven’t run into any Out of Memory Killer situations and the overall system including web browsing has worked well. |
|
|
\ No newline at end of file |