Jump to content

Low RAM usability: Difference between revisions

From postmarketOS Wiki
Iourine (talk | contribs)
Configuring ZRAM: As of kernel 5.16, modprobe zram needs an argument - number of devices to be created. zramctl does not create them but only configures the existing ones.
Iourine (talk | contribs)
ZRAM section moved and incorporated into a dedicated page
Line 27: Line 27:
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.
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 ====
See [https://wiki.postmarketos.org/wiki/ZRAM ZRAM] for more details.
<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, specifying :
# modprobe zram "num_devices=NUMBER"
 
Configure a ZRAM device with <code>zramctl</code>, replacing <code><size></code> with the size of memory that you'd like dedicate to it, 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 11:09, 16 April 2022

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, Xfce4 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.

See ZRAM for more details.