You are not logged in.

#1 Yesterday 18:01:56

TimParaxade
Member
Registered: 2026-07-25
Posts: 3

Two swap partitions despite one single installation?

Pretty much what the name says: I recently installed Arch Linux via the guided installer, made a partition set that normally works for me, but somehow one look with lsblk shows not one, but two swap partitions, one as part of the SSD i installed it on (the intended swap partition), one just named zram0, which I don't know which SSD it's on. How can I figure out which physical device the zram0 volume is part of, and ideally either delete it or replace it with the intended swap partition?

Offline

#2 Yesterday 18:31:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,430

Re: Two swap partitions despite one single installation?

zram is a compressed "swap" that isn't tied to a physical disk and instead just compresses a part of the RAM that would™ be swapped out into your RAM instead (the thinking being that many pieces of RAM can be compressed and thus if they would get swapped out you can regain some space by compressing them). See https://wiki.archlinux.org/title/Zram for more info and how to configure -- and in case -- disable it.

FWIW since I recently came across it here's an interesting blog post by an actual memory subsystem kernel dev on why one would probably want to prefer "normal" swap via zswap instead of zram: https://chrisdown.name/2026/03/24/zswap … -what.html

Last edited by V1del (Yesterday 18:34:45)

Offline

#3 Yesterday 19:06:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,690

Re: Two swap partitions despite one single installation?

tl;dr, zswap *needs* physical swap as backup (file or partition, NOT zram) - zram should™ be the only swap device (if it suffices your needs) and is actually a ramdisk (ie. a logical disk in your RAM)
Also interesting might become https://www.phoronix.com/news/Linux-CRAM-Compressed-RAM - if that pans out you can just compress all RAM all the time (nb. the logarithmic scale)

SoftRAM finally become true wink

@V1del where did you trademark would™ smile

Offline

#4 Yesterday 19:52:46

TimParaxade
Member
Registered: 2026-07-25
Posts: 3

Re: Two swap partitions despite one single installation?

Would it work if'n I set a swap partition but disabled zram when installing?

Offline

#5 Yesterday 20:09:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,430

Re: Two swap partitions despite one single installation?

It would(™ tongue), but what for? It's trivial to disable at any point after the installation.

@seth idk I think I was going to write should™ and then just stuck with it tongue

Offline

#6 Yesterday 20:15:24

TimParaxade
Member
Registered: 2026-07-25
Posts: 3

Re: Two swap partitions despite one single installation?

seth wrote:

tl;dr, zswap *needs* physical swap as backup (file or partition, NOT zram) - zram should™ be the only swap device (if it suffices your needs) and is actually a ramdisk (ie. a logical disk in your RAM)
Also interesting might become https://www.phoronix.com/news/Linux-CRAM-Compressed-RAM - if that pans out you can just compress all RAM all the time (nb. the logarithmic scale)

SoftRAM finally become true wink

@V1del where did you trademark would™ smile

So basically, use either only zram or only swap partition. Am I understanding this right?

Offline

#7 Yesterday 20:16:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,430

Re: Two swap partitions despite one single installation?

basically, yes. but the article seth linked to talks about another option without the drawbacks of either but that's not really live yet and from a cursory look potentially requires specific HW.

Last edited by V1del (Yesterday 20:17:12)

Offline

Board footer

Powered by FluxBB