2

i recently moved from mysql to maria db , i want to enable page compression feature offered by mariadb , but i have no success with enabling it.

https://mariadb.com/kb/en/mariadb/compression/

what i did

i installed lz4 algo as mentioned in above doc

i also run few commands which were OK.

SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_file_format=Barracuda;

but when i run

set global innodb_compression_algorithm=lz4;

i get error

Unknown system variable 'innodb_compression_algorithm'

so any idea how to fix it , basically i have 100mb database and i want to compress it

3
  • And ALTER TABLE tbl ROW_FORMAT=COMPRESSED? Try another compression algo.
    – Rick James
    Commented Feb 15, 2016 at 5:30
  • Then file a bug with mariadb.com .
    – Rick James
    Commented Feb 15, 2016 at 5:30
  • @RickJames ALTER TABLE tbl ROW_FORMAT=COMPRESSED it will use LZ77 compression algo which is legacy and not good , lz4 as fast and use less memory
    – user889030
    Commented Feb 15, 2016 at 5:57

3 Answers 3

2

The main point here is that not all available compression formats are compiled in by default. As you can read here https://mariadb.com/kb/en/mariadb/compression/

Because all of these compression methods are not available by default on all distributions and MariaDB server does not bundle them, you may need to download the desired compression method package from the above links, install the package and finally recompile MariaDB server from the source distribution with:

So to use lz4 you will need to recompile mariadb from source.

1

What's the MariaDB version that your are trying? Page compression was introduced in MariaDB 10.1. more info here

2
  • i know that , i have latest version , i recently switched to mariadb
    – user889030
    Commented Feb 14, 2016 at 6:45
  • Answered on the MariaDB website, user was running MariaDB 10.0 Commented Feb 15, 2016 at 9:21
0

Try setting in my.cnf file

[mysqld]
innodb_compression_algorithm = lz4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.