... | ... | @@ -926,3 +926,24 @@ If you find that the swap file is too large or too small, you can resize it. |
|
|
```
|
|
|
|
|
|
This may already exist from creating a swap file before so don't add a duplicate entry if that's the case.
|
|
|
|
|
|
### Resize ZRAM
|
|
|
|
|
|
1. Before you resize the swap file, you should turn the swap off. You should also make sure that you have enough free RAM available to take the data from swap file. Otherwise, create a temporary swap file.
|
|
|
|
|
|
```sh
|
|
|
sudo swapoff /dev/zram0
|
|
|
```
|
|
|
|
|
|
2. Reset and resize the ZRAM.
|
|
|
|
|
|
```sh
|
|
|
sudo zramctl --reset /dev/zram0
|
|
|
sudo zramctl --find --size 5G
|
|
|
|
|
|
3. Mark and enable the ZRAM.
|
|
|
|
|
|
```sh
|
|
|
sudo mkswap /dev/zram0
|
|
|
sudo swapon /dev/zram0
|
|
|
``` |
|
|
\ No newline at end of file |