Rikus Zram

Anleitung

Aktuelle Fassung: 2.32

Guide

Current version: 2.32

Schritt für Schritt, für Anfänger — jeder Fachbegriff wird erklärt. Du brauchst kein Terminal.

Step by step, for beginners — every technical term explained. You do not need a terminal.

1. Was ist das überhaupt?

1. What is this about?

Stell dir deinen Arbeitsspeicher (RAM) als Schreibtisch vor. Alles, woran der Rechner gerade arbeitet, liegt darauf. Wird der Tisch voll, muss etwas weichen.

Swap ist der Aktenschrank auf der Festplatte: Selten Gebrauchtes wandert hinein. Der Tisch wird frei — aber jedes Zurückholen dauert, denn die Platte ist viel langsamer als der Speicher.

zram ist der Vakuumbeutel: Statt etwas wegzuräumen, presst der Rechner es auf dem Tisch selbst zusammen. Wie Winterkleidung im Vakuumbeutel — es passt viel mehr hinein, und nichts muss den Tisch verlassen. Typisch werden Daten 3- bis 4-fach kleiner: Aus 4 GB Daten wird gut 1 GB belegter Speicher.

Einstellen ließ sich das bisher nur über getippte Befehle und das Bearbeiten von Systemdateien. Rikus Zram macht daraus ein Fenster mit Schiebereglern.

Think of your RAM as a desk. Everything the computer is currently working on lies on it. When the desk fills up, something has to give way.

Swap is the filing cabinet on the disk: rarely used items move into it. The desk frees up — but fetching things back takes time, because the disk is far slower than memory.

zram is the vacuum bag: instead of moving things away, the computer compresses them on the desk itself. Like winter clothes in a vacuum bag — much more fits, and nothing has to leave the desk. Typically data becomes 3–4× smaller: 4 GB of data ends up occupying about 1 GB.

Until now this could only be configured by typing commands and editing system files. Rikus Zram turns that into a window with sliders.

2. Was du brauchst

2. What you need

  • Debian, Ubuntu, Linux Mint, LMDE, MX Linux, antiX, Zorin, Pop!_OS oder ein anderes System aus dieser Familie
  • Dein normales Benutzerpasswort — nur beim Ändern, nicht beim Anschauen
  • Sonst nichts: Alle benötigten Bausteine installiert das Paket mit

Das Programm läuft mit systemd und mit SysVinit — also auch auf MX Linux und antiX. Es merkt selbst, welches davon dein System benutzt.

  • Debian, Ubuntu, Linux Mint, LMDE, MX Linux, antiX, Zorin, Pop!_OS or a relative
  • Your normal user password — only for changes, not for looking
  • Nothing else: the package brings what it needs

The program works with systemd and with SysVinit — so also on MX Linux and antiX. It detects which one your system uses.

3. Installieren — in drei Schritten, ohne Terminal

3. Installing — in three steps, no terminal

  1. Herunterladen. Öffne die Download-Seite und klicke auf die Datei rikus-zram_2.32_all.deb. Sie landet in deinem Ordner Downloads.
  2. Doppelklick. Öffne den Ordner Downloads und klicke die Datei doppelt an. Das Installationsprogramm deines Systems geht auf — du klickst auf „Paket installieren" und gibst dein Passwort ein.
  3. Starten. „Rikus Zram" steht jetzt im Startmenü unter System.

Lieber im Terminal? Zuerst in den Ordner Downloads wechseln, dann die Datei beim vollen Namen nennen:

cd ~/Downloads
sudo apt install ./rikus-zram_2.32_all.deb

Auf Rechnern mit eingeschaltetem Nachschub-Lager (backports) den Zusatz -t trixie-backports anhängen — also sudo apt install -t trixie-backports ~/Downloads/rikus-….deb (Dateiname wie oben). Sonst passen zwei Systempakete nicht zusammen und die Installation bricht ab.

Warum nicht rikus-zram*.deb mit Stern? Weil das schiefgehen kann: Liegen mehrere Fassungen in deinem Downloads-Ordner, sortiert die übliche Kommandozeile (bash) sie alphabetisch — und dabei steht 1.9 hinter 1.19. In einem frischen Debian 13 nachgemessen: Der Stern-Befehl installierte die alte 1.9 statt der neuen. Deshalb hier der volle Name. Hast du über den Knopf „neueste Fassung" geladen, heißt deine Datei rikus-zram-neueste.deb — dann diesen Namen einsetzen. Bitte apt install nehmen, nicht dpkg -i: Nur apt holt fehlende Bausteine von selbst nach.

  1. Download. Open the download page and click the file rikus-zram_2.32_all.deb. It lands in your Downloads folder.
  2. Double-click. Open your Downloads folder and double-click the file. Your system's package installer opens — click "Install Package" and enter your password.
  3. Start it. Rikus Zram is now in your menu under System.

Prefer the terminal? Change into the Downloads folder first, then name the file in full:

cd ~/Downloads
sudo apt install ./rikus-zram_2.32_all.deb

On machines with the backports repository enabled, add -t trixie-backports — i.e. sudo apt install -t trixie-backports ~/Downloads/rikus-….deb (file name as above). Otherwise two system packages will not match and the installation fails.

Why not rikus-zram*.deb with a wildcard? Because it can go wrong: if several versions sit in your Downloads folder, the usual shell (bash) sorts them alphabetically — and there 1.9 comes after 1.19. Measured in a fresh Debian 13: the wildcard command installed the old 1.9 instead of the new one. Hence the full name here. If you used the "latest version" button, your file is called rikus-zram-neueste.deb — use that name instead. Use apt install, not dpkg -i: only apt pulls in missing dependencies by itself.

4. Die erste Seite: Was ist da?

4. The first page: what is there?

Hier wird nichts verändert — es wird nur geschaut. Kein Passwort nötig.

Ganz oben steht eine Ampel mit einem Satz im Klartext:

  • 🟢 Grün: Alles in Ordnung.
  • 🟡 Gelb: Läuft, aber es gibt etwas anzuschauen.
  • 🔴 Rot: Weder zram noch Swap — bei vollem Speicher bricht ein Programm ab.

Darunter siehst du, wie viel Arbeitsspeicher belegt ist, ob zram läuft und wie stark es gerade zusammenpresst, welche Swap-Bereiche es gibt, und wie dein System eingestellt ist.

Nothing is changed here — it only looks. No password needed.

At the top you see a traffic light with one plain sentence:

  • 🟢 Green: All fine.
  • 🟡 Amber: Running, but there is something to look at.
  • 🔴 Red: Neither zram nor swap — programs get killed when memory runs out.

Below that you see how much RAM is in use, whether zram is running and how well it is compressing, which swap areas exist, and how your system is configured.

5. Noch gar kein zram? Genau dafür ist das Programm da

5. No zram at all yet? That is exactly what this is for

Steht die Ampel auf Rot oder Gelb und darunter, dass zram bei dir noch nicht eingerichtet ist: Das ist kein Problem. Die zweite Seite bietet dir an, alles komplett einzurichten:

  1. Das Paket zram-tools wird installiert (dafür brauchst du kurz Internet)
  2. Die Einstellungsdatei wird angelegt
  3. Der Dienst wird eingeschaltet — auch für jeden künftigen Start, nicht nur für jetzt

Warum das nicht selbstverständlich ist: Das Paket zram-tools bringt nur eine Startdatei für systemd mit. Auf Systemen mit einem anderen Startverfahren — MX Linux, antiX, Devuan — würde nach der Installation schlicht nichts starten, ohne jede Fehlermeldung. Rikus Zram legt dort zusätzlich das passende Startskript an.

If the light is red or amber and says zram is not set up on your machine: that is not a problem. The second page offers to set it up completely:

  1. The package zram-tools is installed (this needs an internet connection briefly)
  2. The settings file is written
  3. The service is switched on — for every future start too, not just for now

Why that is not a given: the package zram-tools ships only a startup file for systemd. On systems using a different init — MX Linux, antiX, Devuan — nothing at all would start after installing it, without any error message. Rikus Zram writes the matching init script there as well.

6. Die Regler: Empfehlung ansehen und selbst einstellen

6. The sliders: see the recommendation and adjust

Auf der zweiten Seite steht zuerst, was für diesen Rechner passt — errechnet aus RAM-Größe, SSD oder Festplatte, Dateisystem und Ruhezustand, mit Begründung in normaler Sprache.

Darunter stehen drei Schieberegler. Sie stehen auf dem, was jetzt gerade läuft; die Empfehlung ist als Markierung auf der Skala sichtbar. Verschieben tust du selbst.

  1. zram-Größe — wie viel Prozent deines Arbeitsspeichers zram benutzen darf. Bewährt hat sich die Größe des Arbeitsspeichers (100 %).
  2. swappiness — wie bereitwillig der Rechner Daten beiseiteschiebt. Mit zram darf das beherzt geschehen, denn es geht in den schnellen Speicher, nicht auf die Platte.
  3. Swap-Datei — eine Reserve auf der Platte als Sicherheitsnetz. Bleibt im Alltag leer und greift nur, wenn Speicher und zram voll sind.

The second page first tells you what fits this machine — worked out from RAM size, SSD or spinning disk, filesystem and hibernation setup, with the reasoning in plain words.

Below that are three sliders. They sit on what is running right now; the recommendation shows as a marker on the scale. You move them yourself.

  1. zram size — what percentage of your RAM zram may use. A proven setting is the size of your RAM (100 %).
  2. swappiness — how readily the system moves data aside. With zram this can be done boldly, because it goes into fast memory, not onto the disk.
  3. Swap file — a reserve on disk as a safety net. It stays empty in daily use and only kicks in when RAM and zram are full.

7. Übernehmen — mit Vorschau, Sicherung und Nachmessung

7. Applying — with preview, backup and verification

  1. „Zeigen, was geändert würde" — ein Fenster listet in Klartext auf, was passieren würde und welche Dateien vorher gesichert werden. Es passiert nichts.
  2. „Übernehmen …" — erst hier kommt die Passwortabfrage. Jede angefasste Datei wird vorher kopiert.
  3. Nachmessung — danach prüft das Programm eigenständig, ob die Änderung wirklich gegriffen hat, mit ✔ oder ✘ je Punkt. Kein „müsste jetzt passen".
  4. Rückgängig — ein Knopf stellt den Zustand von davor wieder her.

Auf btrfs bekommt die Swap-Datei einen eigenen Bereich. Sonst könnte Timeshift lautlos keine Sicherungspunkte mehr anlegen — man merkt es erst, wenn man sie braucht. Swap-Partitionen werden nie verändert, nur Dateien.

  1. "Preview what would change" — a window lists in plain words what would happen and which files get backed up first. Nothing happens.
  2. "Apply …" — only now does the password prompt appear. Every file touched is copied first.
  3. Verification — afterwards the program checks on its own whether the change actually took effect, with ✔ or ✘ per item. No "should be fine now".
  4. Undo — one button restores the state from before.

On btrfs the swap file gets its own subvolume. Otherwise Timeshift would silently stop making restore points — and you would only notice when you need one. Swap partitions are never modified, only files.

8. Häufige Fragen

8. Common questions

Kann ich etwas kaputtmachen?
Anschauen und Empfehlen läuft ganz ohne Passwort und ohne Schreibzugriff. Geändert wird nur nach ausdrücklicher Bestätigung, mit Vorschau vorher und Sicherung jeder Datei.

Brauche ich Internet?
Nur, wenn zram bei dir noch gar nicht eingerichtet ist — dann muss das Paket zram-tools nachgeladen werden. Sonst nicht.

Bleibt die Einstellung nach einem Neustart erhalten?
Ja. Der Dienst wird auch für künftige Starts eingeschaltet — auf systemd wie auf SysVinit.

Ich habe schon zram. Bringt das Programm mir dann etwas?
Ja: Es zeigt dir, wie stark gerade zusammengepresst wird, ob deine Werte zu diesem Rechner passen, und lässt dich swappiness und Swap-Datei bequem nachjustieren.

Was ist der Ruhezustand — und brauche ich ihn?
Es gibt drei Arten, den Rechner auszumachen. Beim Herunterfahren wird alles geschlossen. Bei der Bereitschaft — dahin geht ein Laptop beim Zuklappen — bleibt alles offen im Arbeitsspeicher; das ist in 1–2 Sekunden wieder da, braucht aber weiter Strom, und bei leerem Akku ist alles weg. Beim Ruhezustand schreibt der Rechner den ganzen Arbeitsspeicher auf die Platte und schaltet sich komplett aus: kein Strom, und nach dem Einschalten ist alles wieder offen wie vorher.
Dafür brauchst du zwei Dinge: eine Swap-Datei mindestens so groß wie dein Arbeitsspeicher (das Programm zeigt dir die Zahl für deinen Rechner) und einen Eintrag in der Startkonfiguration (resume=) — den setzt Rikus Zram bewusst nicht, weil es den Startvorgang nicht anfasst. zram hilft hier nicht: Es liegt selbst im Arbeitsspeicher und ist beim Ausschalten mit weg.
Für den Alltag reicht die Bereitschaft völlig und ist zehnmal schneller. Ob dein Rechner den Ruhezustand kann, zeigt cat /sys/power/state — steht dort disk, wäre er möglich.

Ich benutze btrfs — muss ich etwas beachten?
Nur eines: Für eine Swap-Datei auf btrfs wird das Paket btrfs-progs gebraucht. Es wird automatisch mitinstalliert. Fehlt es trotzdem, sagt das Programm das vorher und ändert nichts. Die Swap-Datei bekommt auf btrfs übrigens einen eigenen Bereich, damit Timeshift weiter Sicherungspunkte anlegen kann.

Wo finde ich Fehler zum Melden?
Über den Knopf „Mir schreiben“. Was sich in jeder Fassung geändert hat, steht im Änderungsprotokoll.

Can I break anything?
Looking and recommending runs entirely without a password and without writing. Changes happen only after you explicitly confirm, with a preview beforehand and a backup of every file.

Do I need internet?
Only if zram is not set up on your machine yet — then the package zram-tools has to be downloaded. Otherwise no.

Does the setting survive a reboot?
Yes. The service is switched on for future starts too — on systemd as well as on SysVinit.

I already have zram. Is this still useful?
Yes: it shows you how well it is compressing right now, whether your values suit this machine, and lets you adjust swappiness and the swap file comfortably.

What is hibernation — and do I need it?
There are three ways to turn a computer off. Shutting down closes everything. Standby — what a laptop enters when you close the lid — keeps everything open in RAM; back in 1–2 seconds, but it keeps drawing power, and when the battery dies it is all gone. Hibernation writes the entire RAM to disk and switches the machine off completely: no power at all, and after switching on everything is open again as before.
You need two things for it: a swap file at least the size of your RAM (the program shows the figure for your machine) and an entry in the boot configuration (resume=) — Rikus Zram deliberately does not set that, because it does not touch the boot process. zram cannot help here: it lives in RAM itself and is gone when the power goes off.
For everyday use standby is plenty and ten times faster. To see whether your machine can hibernate, run cat /sys/power/state — if disk appears, it would be possible.

I use btrfs — anything to watch out for?
Just one thing: a swap file on btrfs needs the package btrfs-progs. It is installed automatically. If it is missing anyway, the program says so beforehand and changes nothing. On btrfs the swap file also gets its own subvolume so that Timeshift can keep making snapshots.

Where do I report problems?
Via the “Write to me” form. What changed in each release is in the changelog.

Kostenlos anfordernGet it free Zurück zur StartseiteBack to the home page

Einmal anmelden — der Code kommt sofort per E-Mail.Sign up once — the code arrives by e-mail at once.

☕ Wenn es dir geholfen hat☕ If it helped you

Dieses Programm kostet nichts und wird auch nie etwas kosten. Ich baue es in meiner Freizeit. Wenn es dir Arbeit erspart hat und du magst, freue ich mich über einen Kaffee — und wenn nicht, ist das genauso in Ordnung.This program is free and always will be. I build it in my spare time. If it saved you some work and you feel like it, I would be glad about a coffee — and if not, that is just as fine.

☕ Einen Kaffee spendieren☕ Buy me a coffee

Freiwillig · über PayPal · jeder Betrag hilftEntirely voluntary · via PayPal · any amount helps

📋 Was sich geändert hat📋 What has changed·✉️ Neues per E-Mail bekommen✉️ Get news by e-mail