Questions tagged [zram]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

How to limit swap usage without using sysctl or resizing the partition?

There is the following scenario: I have an HDD disk that uses LVM and I cannot resize the partitions in it, in this disk, there is a swap partition that is 10gb. I also use zram apart from disk based ...
user avatar
3 votes
3 answers
594 views

Does swap on zram free backing pages when pages are unswapped from it?

Imagine a scenario where 2GiB is swapped out to zram and compresses down to 1GiB. Once the memory pressure is alleviated and the 2GiB gradually become unswapped, does Linux free the 1GiB of pages that ...
user avatar
  • 335
0 votes
1 answer
120 views

My RAM usage never goes over 75% when system is lagging and under heavy load

Linux matrix 5.15.2-xanmod1-1 #1 SMP Wed, 17 Nov 2021 02:36:25 +0000 x86_64 GNU/Linux NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS sda ...
user avatar
  • 19
1 vote
1 answer
148 views

Explain Zram and Swap numbers

Ok, so there are really 2 questions here, why is my on disk swap being used? Is the compression of my swap really this good? It seems pretty unlikely, but it's also possible it is because it's memory ...
user avatar
2 votes
0 answers
237 views

How much percentage should zram take?

I'm setting up zram on my server, let's say I have 4GB ram, should zram take 3.5G or 1G or something in between? What trade off will I have when going to the extremes? And, for example I have a single ...
user avatar
  • 121
1 vote
1 answer
407 views

zramswapon failed: Operation not permitted

When I try to enable the zram service on a machine with 32 cores, it fails when the number of devices is greater than 26. Also, I do not see any configuration file, only zramctl utility with no ...
user avatar
  • 13
2 votes
0 answers
74 views

"Preempting" less-used pages in high priority swap to lower priority swap

Let's say I've got two swap partitions on my Linux machine. One is zram and a higher priority. The other is on disk and a lower priority. I prefer the zram swap because it's faster. As I understand it,...
user avatar
  • 153
0 votes
2 answers
324 views

How to Enable ZRAM on PC?

I am trying to know how to enable ZRAM for my PC running Ubuntu. I have heard that the ZRAM is speeding up some laptop and PCs, so will the ZRAM help My PC too? PC specs: CPU: Intel Core 2 Duo E4500 (...
user avatar
2 votes
1 answer
4k views

Why does zram occupy much more memory compared to its "compressed" value?

I set up zram and made extensive tests inside my Linux machines to measure that it really helps in my scenario. However, I'm very confused that zram seems to use up memory of the whole uncompressed ...
user avatar
2 votes
1 answer
165 views

Get % used of zram in script

I've got a script that collects various bits of system data and reports this via MQTT to a central local server. I recently implemented zram with priority over swap to see if this offers a performance ...
user avatar
3 votes
1 answer
445 views

Using loopdev for zRAM writeback feature

Documentation states that zRAM writeback feature supports only swap partitions as it's backing_dev. But I've successfully used a swap file too, by attaching it to a loop device losetup /dev/loop0 /...
user avatar
0 votes
1 answer
728 views

Effect of enabling zswap on zram without any disk swap

I have set up a system that has 4 GB RAM with 1.5 GiB of zram. It also has zswap enabled. I don't have any swap partition on the secondary storage. As I have noticed, the performance is good on my ...
user avatar
  • 1,645
0 votes
1 answer
963 views

After a heavy I/O load, and storing many things in Zram, used space is close to total in `free`

I do not think that this is Linux's disk cache. In htop, the memory bar is green (not orange for cache) and I removed the files stored in zram. No processes seem to be using a lot of memory. The load ...
user avatar
  • 11
2 votes
1 answer
412 views

How to change zram sector size?

I have cloned a disk into a sparse file that is about 80G but indeed requires only about 12G, even not compressed it fits on my memory, but in order to save some resources I want to use zram: sudo ...
user avatar
7 votes
1 answer
1k views

Make or force tmpfs to swap before the file cache

Consider the following scenario. You have a slow read-only media (e.g. write-protected Thumb Drive, CD/DVD, whatever) that you installed Linux on (not a Live CD per se, but a normal build), and use it ...
user avatar
  • 185
0 votes
1 answer
70 views

compress a single file ... zram ? cloop?

We have a legacy centos 5.11 server; filesystems are ext3, we cannot change. Is it possible to have realtime compression on a single file (a giant log file) ? zram : I cannot find it in the repos... ...
user avatar
  • 945
3 votes
1 answer
1k views

Is zstd for zram actually available in Linux 4.15?

I found zstd in /drivers/block/zram/zcomp.c, but I can't find anything zstd-related in /crypto. So is zstd for zram actually available in Linux 4.15 or not?
user avatar
6 votes
1 answer
4k views

Prevent zram LRU inversion with zswap and max_pool_percent = 100

The major disadvantage of using zram is LRU inversion: older pages get into the higher-priority zram and quickly fill it, while newer pages are swapped in and out of the slower [...] swap The ...
user avatar
  • 25k
0 votes
0 answers
304 views

Why /sys/block/zram0/comp_algorithm not exist?

See zram kernel doc we know there should have /sys/block/zram0/comp_algorithm Examples: #show supported compression algorithms cat /sys/block/zram0/comp_algorithm lzo [lz4] #...
user avatar
  • 391
11 votes
2 answers
4k views

What is an alternative for zcache?

I want to use a high-speed swap device or zram as "page cache", so that page data can be dropped automatically when the system is out of memory. Apparently, zcache has been discontinued. Is there an ...
user avatar
3 votes
1 answer
1k views

systemd : write a .service daemon for setting up swap and fs in zram

I recently acquired a laptop with a ssd and in order not to weigh too much on the ssd (which I was told had a limited number of write cycles), I decided to write a systemd unit file for setting up a ...
user avatar
  • 896
0 votes
1 answer
301 views

Have I installed and started zram successfully?

On my Kubuntu 13.10 laptop, have installed zram by sudo aptitude install zram-config and the output of swapon -s Filename Type Size Used Priority /...
user avatar
  • 2,379
4 votes
0 answers
814 views

How much RAM is there?

I'm trying to estimate how effective the zram kernel module is in case of my PC. I have a pretty old machine (7y) with the only 1 GiB of RAM. I created two zram swaps (two core processor), 250MiB ...
user avatar
6 votes
2 answers
2k views

How do I determine ZCACHE works on my box?

I have an Marwell Kirkwood ARM-based NAS server Zyxel NSA 310. I compiled my own 3.8 kernel and enabled ZCACHE, but I still see 256 MB of RAM. I am not sure if GNU free utility should show extra ...
user avatar
  • 1,892
3 votes
0 answers
649 views

zram swap instability

I use Mint 13 Maya with mainline kernel 3.6.3 for Ubuntu Quantal on my Asus P53E Notebook. I use zram swap that comes with the package zram-config. I've noticed that using it the system to hangs at ...
user avatar
17 votes
3 answers
13k views

What is the appropriate value of vm.swappiness when using zram?

I'm using zram on my computer as a compressed RAM-backed swap. When the system needs to swap something out, swapping it to a zram-backed swap file is more or less equivalent to compressing that data ...
user avatar
4 votes
1 answer
2k views

How to fix zramswap error?

I installed zramswap-enabler on Ubuntu 11.10 using the ppa but when installing programs or running system upgrades I get this error: Setting up zramswap-enabler (0.2.1-0~12~oneiric1) ... start: Job ...
user avatar
  • 41
0 votes
1 answer
2k views

Zram does not start at start-up

I am using pinguyos 11.10. Pinguyos is a variant of Ubuntu 11.10. I have installed zram like this: sudo add-apt-repository ppa:shnatsel/zram sudo apt-get update sudo apt-get install zramswap-enabler ...
user avatar
9 votes
2 answers
8k views

Cleancache vs zram?

I have an old laptop here with only 512 MB of RAM. Since a few kernel releases, I am using zram to convert 256 MB of it to a compressed ramdisk which is then used as swap. This has proved to be very ...
user avatar
  • 293
12 votes
5 answers
22k views

How to set up properly zram and swap

I'm configuring & compiling new 3.0 kernel. One of the goodies I planned to use for some time (by patching) that was merged into 3.0 is zram. Is it possible to set both hdd swap and zram swap so ...
user avatar