Announcement

Collapse
No announcement yet.

ZRAM Will See Greater Performance On Linux 5.1 - It Changed Its Default Compressor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    So, LZ4 or zstd?

    Comment


    • #32
      Originally posted by Mario Junior View Post
      So, LZ4 or zstd?
      lz4 on single core, pzstd on multicore

      Comment


      • #33
        Out of curiosity I did a test comparing rlo-rle vs. lz4 vs. zstd when setting a ext4 partition on a zram device on Ubuntu 20.04. Here is how I created it:

        Code:
        ZRAM_SIZE=2048M
        if [ ! -e /tmp/zram ]; then
          modprobe zram num_devices=1 && \
           echo `nproc` > /sys/block/zram0/max_comp_streams && \
           echo zstd > /sys/block/zram0/comp_algorithm && \
           echo Size: $ZRAM_SIZE
           echo "$ZRAM_SIZE" > /sys/block/zram0/disksize && \
           mkfs.ext4 /dev/zram0 && \
           mkdir -p /tmp/zram && \
           mount /dev/zram0 /tmp/zram && \
           chmod 777 /tmp/zram && \
           chmod +t /tmp/zram
        fi
        I rebooted at every algo change and repeated a test procedure I am using on that partition 3 times. I did those tests within a 2vCPU VM on a host with other VMs running, so it's not very reliable, but that's my use case. The tests are not very conclusive:
        • with lzo-rle (default): 149s - 141s - 144s
        • with lz4: 160s - 147s - 132s
        • with zstd: 148s - 133s - 139s

        Comment

        Working...
        X