Package Details: zramswap 4-1

Git Clone URL: https://aur.archlinux.org/zramswap.git (read-only)
Package Base: zramswap
Description: Sets up zram-based swap devices on boot
Upstream URL: http://en.wikipedia.org/wiki/ZRam
Licenses: GPL
Submitter: Svenstaro
Maintainer: rpodgorny
Last Packager: rpodgorny
Votes: 217
Popularity: 1.025985
First Submitted: 2011-10-05 23:35
Last Updated: 2019-07-10 14:19

Required by (0)

Sources (3)

Latest Comments

1 2 3 4 5 6 ... Next › Last »

Sandm commented on 2019-07-07 10:24

@rpodgorny there are bashisms in zramctrl script and it basically not operable. Not everybody link /bin/sh to /bin/bash. So please either remove bashisms or use #!/bin/bash in this script, not #!/bin/sh

telsch commented on 2019-06-14 20:06

why not make compression configurable?

--- /tmp/zramctrl       2019-05-07 22:03:36.000000000 +0200
+++ /usr/lib/systemd/scripts/zramctrl   2019-06-14 22:01:00.554880553 +0200
@@ -11,6 +11,9 @@
   (( MEM_TOTAL= `cat /proc/meminfo|grep MemTotal|awk '{print $2}'` * 1024 ))
   (( MEM= MEM_TOTAL * $ZRAM_SIZE_PERCENT / 100 ))
   modprobe zram
+  if [ -n "$ZRAM_COMPRESSION_ALGO" ]; then
+    echo "$ZRAM_COMPRESSION_ALGO" > /sys/block/zram0/comp_algorithm
+  fi
   echo $MEM > /sys/block/zram0/disksize
   mkswap /dev/zram0 -L zram0
   swapon -p 100 /dev/zram0

shah26842 commented on 2019-05-17 23:37

Why are you using /bin/sh and not /bin/bash? Not everyone have linked their sh to bash. If you are using dash for example, it will break the script.

rpodgorny commented on 2019-05-06 22:41

i've quicky hacked a new version. please try it out...

rpodgorny commented on 2019-05-06 21:51

thanks for all the input. i'll be leaving tomorrow for a week but i'll try to look into this before i leave. otherwise, please be patient... ...also, always patches welcome! ;-)

stuartiannaylor commented on 2019-05-06 19:37

Still does strange things like create multiple devices when zram is multi-stream by default.

Doesn't check for existing zram services and so will overwrite.

Also omits the mem_limit cap to control actual memory usage.

Irrespective of alg its still out of date.

Freso commented on 2019-05-06 19:32

I mean, if it hadn’t been changed to specifically use the non-default compression algorithm, upgrading the kernel to 5.1+ would automatically have made lzo-rle what was used by default… I don’t think the script should hardcode the compression method. If people want to use lz4, they can make it do so themselves. Trust that the kernel devs make informed decisions on what compression to use by default?

papakilo commented on 2019-05-06 13:56

@rpodgorny

I have changed your config and I'm already trying lzo-rle with kernel 5.1:

$ cat /sys/block/zram0/comp_algorithm lzo [lzo-rle] lz4 lz4hc 842 zstd

$ zramctl NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT /dev/zram1 lzo-rle 480,6M 4K 79B 12K 2 [SWAP] /dev/zram0 lzo-rle 480,6M 4K 79B 12K 2 [SWAP]

Now I'm testing if really faster than lz4...

papakilo commented on 2019-05-06 13:25

Hi rpodgorny,

as you asked me to advise you, Linux kernel 5.1 is finally available.

So now that lzo-rle compression is also available (https://www.phoronix.com/scan.php?page=news_item&px=ZRAM-Linux-5.1-Better-Perform), will you apply it to zramswap?

rpodgorny commented on 2019-03-15 13:47

bump me when 5.1 is out. also, please remove the package deletion request. thank you...