What is the default swap memory setup on Manjaro ARM?

What is the default setup for swap memory, if any, on Manjaro ARM?

I have Manjaro ARM 20.04 LXQT installed on a Raspberry Pi 3B, using the manjaro-arm-installer, plus the subsequent updates.

I don't entirely know what I should be looking for but I have been exploring the system for swap memory and found nothing, free -h and htop show zero swap, swapon --show shows nothing and neither can a I see a swapfile anywhere. Searching the forum has not revealed any definitive information either - what am I missing?

I am aware that zram or zswap are good options but I wanted to establish if anything was already setup before proceeding. Is swap memory left as an option at user discretion?

We just recently added zswap-arm to our editions.
Prior to that, we had no swap enabled/set up.


Install and enable / start zswap-arm.service. The memory size it uses will vary on how much ram you have onboard so it's size will be different across arm devices. This will computed when the the .service is initialized and is done automatically so it will not over / under do the size of the swap.

1 Like

Thank you @Strit and @Darksky for your replies: In essence no swap is set up but zswap-arm is a favoured option.

On my RPi3B I plan to move the operating system from the SD card to a BTRFS formatted USB flash memory device, after which I intend to activate zswap-arm and have a swap partition on a separate USB device (perhaps I should research zswap also?).

zswap-arm is going to be enabled by default from next release. :slight_smile:

1 Like

I do not know if I fully understand your goal but zswap-arm only uses a space in RAM and does not use the disk at all. All data that is put in the RAM swap space is also compressed which allows more data to be put in to it. If a drive is used for a swap space it likely will take more of a performance hit with the read / writes.

Since you are posting here I am assuming you are running your pi3b on 64bit and if you intend to use it as a desktop it's brain power is barely there to work. I have tested my pi3b with zswap-arm using say firefox and it does work ok but the waiting for pages to load up because of the low brain power of the cpu is some what of a draw back. But after that it does play youtube vids.

With no swap using firefox Your system will eventually will freeze. With swapping to disk things get sluggish and mouse freezes until things get caught up. With zswap-arm things are a whole lot better responsive.

If you have proper cooling for your pi3b board if it was me I would look into overclocking. It seems that all pi's are not created equal when it comes to overclocking. One guy's config may or may not work on yours. The main thing is to get it to boot and maintain a good cpu temp using cpu-temp-speed to monitor. On the pi3 when I was using it as my main pi board I would put in the config.txt a line that would cut back the cpu when it hit a certain temp just below what the RPi people use as default for the pi3b as a safety valve:


I am not bashing the pi3b at all and when it was on the top of the RPi food chain I thought I was on top of the world with it. I even remember using the pi1 when it was their latest as slow as it was I was very happy with it.

1 Like

Thanks again.

On occasions I am sure the RAM will fill up (even if it is compressed) so i am looking to have an overflow swap partition, even though the system may be sluggish for a while it's better than having it freeze completely.

I find its performance is still impressive for what it is, but no I am not intending to use it as a desktop. I hope to explore using it for some distributed ledger technology projects and otherwise running various BOINC projects and permanently powered up and accessed via ssh.

How can I see stats on zswap?
I want to make sure its on

If you run free -m and it mentions Swap, then it's on.
Since we don't do any regular swap partitions by default.

lsblk will show it and with htop you can watch in real time if and when it is used. Another command to run free every 2 seconds in a terminal is "watch free".

[ray@pi4 boot]$ lsblk
sda      8:0    1  14.5G  0 disk 
├─sda1   8:1    1 213.6M  0 part /boot
└─sda2   8:2    1  14.3G  0 part /
zram0  254:0    0  11.5G  0 disk [SWAP]

free -m and watch free show the swap 0 usage, but lsblk doesnt show the zram

I had a swapfile enabled before I enabled zswap-arm. Am I correct in assuming that the system will first use the zram as swap, then evict to the swapfile, as it gets full?

Forum kindly sponsored by