Skip to content

Commit 9c7cce2

Browse files
committed
Move ZRAM recompression setup from udev to zram-generator config
Signed-off-by: Vasiliy Stelmachenok <[email protected]>
1 parent e262371 commit 9c7cce2

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

usr/lib/systemd/zram-generator.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[zram0]
2-
compression-algorithm = zstd
2+
compression-algorithm = zstd lz4 (type=huge)
33
zram-size = ram
44
swap-priority = 100
55
fs-type = swap

usr/lib/udev/rules.d/30-zram.rules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Prefer to recompress only huge pages. This will result in additional memory
2-
# savings, but may slightly increase CPU load due to additional compression
3-
# overhead.
4-
ACTION=="add", KERNEL=="zram[0-9]*", ATTR{recomp_algorithm}="algo=lz4 priority=1", \
5-
RUN+="/sbin/sh -c echo 'type=huge' > /sys/block/%k/recompress"
6-
71
TEST!="/dev/zram0", GOTO="zram_end"
82

93
# Since ZRAM stores all pages in compressed form in RAM, we should prefer

0 commit comments

Comments
 (0)