... | ... | @@ -983,23 +983,9 @@ To make the changes persist between reboots, create a service that executes the |
|
|
sudo systemctl status $serviceName
|
|
|
```
|
|
|
|
|
|
Alternatively, the systemd zram-generator service can be configured (zram-generator systemd manual page: <https://raw.githubusercontent.com/systemd/zram-generator/master/man/zram-generator.conf.md>).
|
|
|
Alternatively, the systemd zram-generator service can be configured (zram-generator systemd manual page: <https://raw.githubusercontent.com/systemd/zram-generator/master/man/zram-generator.conf.md>; also see <https://www.ctrl.blog/entry/how-to-systemd-zram-generator.html>).
|
|
|
|
|
|
- `zram-fraction` - Defines the scaling factor of the zram device's size with relation to the total usable RAM. Defaulted to *0.5*.
|
|
|
- `max-zram-size` - Sets the limit on the zram device's size obtained by `zram-fraction`. Defaulted to *4096*.
|
|
|
|
|
|
1. In `/etc/systemd/zram-generator.conf.d/librem5.conf`:
|
|
|
|
|
|
```conf
|
|
|
zram-fraction=2.0
|
|
|
max-zram-size=none
|
|
|
```
|
|
|
|
|
|
2. Run the command `systemctl restart systemd-zram-setup@zram0` to recreate the ZRAM device without rebooting.
|
|
|
|
|
|
Alternative instructions to configure the systemd zram-generator service (Source: <https://www.ctrl.blog/entry/how-to-systemd-zram-generator.html>):
|
|
|
|
|
|
1. Create the file `/etc/systemd/zram-generator.conf` and include the below configuration example. (You can also leave an empty file in this path to disable ZRAM).
|
|
|
1. Create the file `/etc/systemd/zram-generator.conf.d/librem5.conf` and include the below configuration example. (You can also leave an empty file in this path to disable ZRAM).
|
|
|
|
|
|
```conf
|
|
|
[zram0]
|
... | ... | @@ -1007,10 +993,15 @@ Alternative instructions to configure the systemd zram-generator service (Source |
|
|
max-zram-size=4096
|
|
|
```
|
|
|
|
|
|
- `zram-fraction` - Defines the scaling factor of the zram device's size with relation to the total usable RAM. Defaulted to *0.5*.
|
|
|
- `max-zram-size` - Sets the limit on the zram device's size obtained by `zram-fraction`. Defaulted to *4096*.
|
|
|
|
|
|
> 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.
|
|
|
|
|
|
Run the command `systemctl restart systemd-zram-setup@zram0` to recreate the ZRAM device without rebooting.
|
|
|
|
|
|
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/>
|
... | ... | |