Swap. what is recommended

I think you are right.

At least it is enabled by default in lts kernel but not in newest kernels.

2 Likes

If you have situations that you frequently have high memory pressure zram or zswap aren’t generally good enough to prevent the system locking up or crashing.

In general desktop use 95% of the time they’re fine but if you want to eliminate the possibility even a couple GB of disk swap can give the system a chance to recover. Usually zram/zswap will be prioritized first so the small amount of disk swap won’t be used except in dire situations

I discovered that zram wasn’t good enough when inkscape had a memory leak and brought my system to its knees. Adding disk swap allowed that to not crash my system and me fix the situation before that happened

1 Like

Just found this https://github.com/xvitaly/zswap-cli which seems to confirm what I think about getting nice information regarding zswaps settings and activities.

It should be enabled in the latest stable as well according to the Wiki:

In the stable linux official kernel, zswap is enabled by default. This can be verified via the CONFIG_ZSWAP_DEFAULT_ON flag in the stable kernel config.

:thinking:

1 Like

I have to admit I have only checked zen kernel where it wasn’t and (sorry) assumed with the latest kernel it is the same.

2 Likes

Here’s a good blog on the topic

2 Likes

The file system one uses should probably also be kept in mind.

I don’t remember the exact rationale, but when i decided on BTRFS and snapshots, zram was generally recommended over zswap, as easier to set up. I use just zram, with no swap subvolume.

1 Like

thank you all. glad you shared your experiences and points of view with me.
i will probably create a swap file. this fits best for my needs and my system confguration.

:handshake:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.