Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-987

LZ4 compression for on-disk columnar data

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 6.1.1
    • 6.1.1
    • writeengine
    • None

    Description

      According to different comparisions, e.g. here LZ4 might have:

      • better compression rate
      • better decompression speed
      • almost the same compression speed
        compared with Snappy. MCS uses Snappy by default for both columnar files and CompressedInetStreamSocket(TCP socket) implementation.

      The chunk size is an important parameter used to define how much worth of data is compressed in one go to store in the compressed columnar file. As of now it is set to 4MB that might be less apropriate for LZ4 so one should compare different compressed chunk size values.
      In the end MCS must have another compression method that is controlled via the session variable columnstore_compression_type. There will be no separate knob to control compression used by CompressedInetStreamSocket.

      If LZ4 performs as well as expected(faster decompression, better compression, compression speed parity) it will become our default.

      Attachments

        Activity

          costins Costin Stefan added a comment -

          Are there any chances to implement this feature in near future?

          We are evaluating MariaDB ColumnStore engine and found the compression ratio of the snappy algorithm a "no go".
          For our data, the compression ratio is less than two (1.5 to 1.3).

          Thank you in advance,

          Costin

          costins Costin Stefan added a comment - Are there any chances to implement this feature in near future? We are evaluating MariaDB ColumnStore engine and found the compression ratio of the snappy algorithm a "no go". For our data, the compression ratio is less than two (1.5 to 1.3). Thank you in advance, Costin
          denis0x0D Denis Khalikov (Inactive) added a comment - - edited

          First pull request is added for review https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/1837
          It modifies current compression interface to be able to add new compression algo.
          The next one is LZ4 itself.

          denis0x0D Denis Khalikov (Inactive) added a comment - - edited First pull request is added for review https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/1837 It modifies current compression interface to be able to add new compression algo. The next one is LZ4 itself.
          denis0x0D Denis Khalikov (Inactive) added a comment - - edited

          Final version on review: https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/1842
          Also added tests to compare the compression ratio `snappy` vs `lz4` for different input data.

          On top of this patch added a commit https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/1842/commits/5d3d766e4bc55cc018632178cb4cf1256f47842d which set LZ4 as default to trigger all tests suite under LZ4 compresison, this commit should be removed before merging

          denis0x0D Denis Khalikov (Inactive) added a comment - - edited Final version on review: https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/1842 Also added tests to compare the compression ratio `snappy` vs `lz4` for different input data. On top of this patch added a commit https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/1842/commits/5d3d766e4bc55cc018632178cb4cf1256f47842d which set LZ4 as default to trigger all tests suite under LZ4 compresison, this commit should be removed before merging
          drrtuy Roman added a comment -

          4QA JFYI the output of call columnstore_info.compression_ratio() has changed.

          drrtuy Roman added a comment - 4QA JFYI the output of call columnstore_info.compression_ratio() has changed.

          Build verified: 6.6.1 (#2742)

          MariaDB [mytest]> call columnstore_info.compression_ratio();
          -------------------------------------+

          compression_method compression_ratio

          -------------------------------------+

          Snappy 2.2256:1
          LZ4 0.5288:1

          -------------------------------------+

          Also tested default value, as well as setting new value, for the columnstore_compression_type variable.

          dleeyh Daniel Lee (Inactive) added a comment - Build verified: 6.6.1 (#2742) MariaDB [mytest] > call columnstore_info.compression_ratio(); ------------------- ------------------+ compression_method compression_ratio ------------------- ------------------+ Snappy 2.2256:1 LZ4 0.5288:1 ------------------- ------------------+ Also tested default value, as well as setting new value, for the columnstore_compression_type variable.

          People

            dleeyh Daniel Lee (Inactive)
            LinuxJedi Andrew Hutchings (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.