zramctl: failed to set algorithm: Invalid argument

Solution Unverified - Updated -

Issue

When using zramctl with lz4, lz4hc or 842 compression algorithms the execution results into the following error

#sudo modprobe zram  num_devices=1
#sudo zramctl --find --size 1024M -a lz4
zramctl: /dev/zram0: failed to set algorithm: Invalid argument

From zramctl man page:

OPTIONS
       -a, --algorithm lzo|lz4|lz4hc|deflate|842

Environment

  • Red Hat Enterprise Linux
    • 8
    • 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content