Low RAM usability: Difference between revisions
Add info about ZRAM |
|||
Line 19: | Line 19: | ||
For basic GUI utility apps, the set of CoreApps (Qt5) may be a good choice to minimize the memory footprint. | For basic GUI utility apps, the set of CoreApps (Qt5) may be a good choice to minimize the memory footprint. | ||
== Workarounds == | |||
There are some ways to workaround the limited size of physical memory. | |||
=== ZRAM === | |||
A kernel module that compresses memory to allow for fitting more data onto physical memory. This however consumes CPU cycles to do the compression, so it is a tradeoff between memory and CPU. With that considered, it is still usually much better than running out of memory and having to deal with the instant degradation of performance caused by that. | |||
==== Kernel Configuration ==== | |||
<code>CONFIG_ZRAM</code> must be enabled, either built-in or as a module. | |||
==== Configuring ZRAM ==== | |||
If ZRAM is built as a module, then you must load it first: | |||
# modprobe zram | |||
Create a ZRAM device with <code>zramctl</code>, replacing <code><size></code> with the size of your physical memory, and <code><n></code> with the number of CPUs available: | |||
# zramctl -f -s <size> -t <n> | |||
Make it a swap device: | |||
# mkswap /dev/zram0 | |||
Then activate it: | |||
# swapon /dev/zram0 | |||
It may also be a good idea to give it a high priority using <code>--priority</code> if there are disk-based swap devices in use. |
Revision as of 09:56, 11 July 2021
While postmarketOS has been historically used on devices with as little as 256MB RAM (see Nokia N900), modern usage on less than 2GB RAM can be challenging.
Interfaces
UIs can be categorized as follows, considering at least some space left to running applications.
- LXQT, i3, sway for 256MB+ RAM
- MATE, XFCE for 768MB+ RAM.
- In both cases, make sure to disable the "compositing" window manager feature from settings to achieve much higher performance on older processors.
- Phosh, KDE Plasma for 1GB+ RAM.
- KDE Plasma Desktop should be used in "Xorg mode" for lower resource consumption
- GNOME for 2GB+ RAM
Browsers
Not much, since latest versions of both Firefox and Chromium are intensive on RAM usage. Netsurf is arguably still the best choice for low-power devices, but text-based browsers are ultimately the best choice for very limited devices.
Apps
For basic GUI utility apps, the set of CoreApps (Qt5) may be a good choice to minimize the memory footprint.
Workarounds
There are some ways to workaround the limited size of physical memory.
ZRAM
A kernel module that compresses memory to allow for fitting more data onto physical memory. This however consumes CPU cycles to do the compression, so it is a tradeoff between memory and CPU. With that considered, it is still usually much better than running out of memory and having to deal with the instant degradation of performance caused by that.
Kernel Configuration
CONFIG_ZRAM
must be enabled, either built-in or as a module.
Configuring ZRAM
If ZRAM is built as a module, then you must load it first:
# modprobe zram
Create a ZRAM device with zramctl
, replacing <size>
with the size of your physical memory, and <n>
with the number of CPUs available:
# zramctl -f -s <size> -t <n>
Make it a swap device:
# mkswap /dev/zram0
Then activate it:
# swapon /dev/zram0
It may also be a good idea to give it a high priority using --priority
if there are disk-based swap devices in use.