Details

      Description

      I want to try the page compressed, but I can't see the effect.
      This is my steps.

      MariaDB [test]> set global innodb_file_format=Barracuda;
      Query OK, 0 rows affected (0.00 sec)
      
      MariaDB [test]> set global innodb_compression_algorithm=zlib;
      Query OK, 0 rows affected (0.00 sec)
      

      I create a table to test the page compressed.

      MariaDB [test]> CREATE TABLE `T1` ( `a` int(11) DEFAULT NULL ) engine=innodb page_compressed=1;
      Query OK, 0 rows affected (0.01 sec)
      

      And I check the variables and status.

      MariaDB [test]> show variables like '%compress%';
      +-------------------------------------------+-------+
      | Variable_name                             | Value |
      +-------------------------------------------+-------+
      | have_compress                             | YES   |
      | innodb_background_scrub_data_compressed   | OFF   |
      | innodb_background_scrub_data_uncompressed | OFF   |
      | innodb_compression_algorithm              | zlib  |
      | innodb_compression_failure_threshold_pct  | 5     |
      | innodb_compression_level                  | 6     |
      | innodb_compression_pad_pct_max            | 50    |
      | innodb_immediate_scrub_data_uncompressed  | OFF   |
      | innodb_log_compressed_pages               | OFF   |
      | slave_compressed_protocol                 | OFF   |
      +-------------------------------------------+-------+
      
      MariaDB [test]> SHOW STATUS LIKE '%compress%';
      +------------------------------------------+-------+
      | Variable_name                            | Value |
      +------------------------------------------+-------+
      | Compression                              | OFF   |
      | Innodb_page_compression_saved            | 0     |
      | Innodb_page_compression_trim_sect512     | 0     |
      | Innodb_page_compression_trim_sect1024    | 0     |
      | Innodb_page_compression_trim_sect2048    | 0     |
      | Innodb_page_compression_trim_sect4096    | 0     |
      | Innodb_page_compression_trim_sect8192    | 0     |
      | Innodb_page_compression_trim_sect16384   | 0     |
      | Innodb_page_compression_trim_sect32768   | 0     |
      | Innodb_num_pages_page_compressed         | 0     |
      | Innodb_num_page_compressed_trim_op       | 0     |
      | Innodb_num_page_compressed_trim_op_saved | 0     |
      | Innodb_num_pages_page_decompressed       | 0     |
      | Innodb_num_pages_page_compression_error  | 0     |
      | Innodb_defragment_compression_failures   | 0     |
      +------------------------------------------+-------+
      
      MariaDB [test]> SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES;
      +-------+-------------+------+-------------+------------+-----------+---------------+
      | SPACE | NAME        | FLAG | FILE_FORMAT | ROW_FORMAT | PAGE_SIZE | ZIP_PAGE_SIZE |
      +-------+-------------+------+-------------+------------+-----------+---------------+
      |   145 | test/T1     |  865 | Barracuda   | Dynamic    |     16384 |             0 |
      +-------+-------------+------+-------------+------------+-----------+---------------+
      

      Then I insert 100MB data into T1 and check the status again.

      MariaDB [test]> SHOW STATUS LIKE '%compress%';
      +------------------------------------------+-------+
      | Variable_name                            | Value |
      +------------------------------------------+-------+
      | Compression                              | OFF   |
      | Innodb_page_compression_saved            | 0     |
      | Innodb_page_compression_trim_sect512     | 0     |
      | Innodb_page_compression_trim_sect1024    | 0     |
      | Innodb_page_compression_trim_sect2048    | 0     |
      | Innodb_page_compression_trim_sect4096    | 0     |
      | Innodb_page_compression_trim_sect8192    | 0     |
      | Innodb_page_compression_trim_sect16384   | 0     |
      | Innodb_page_compression_trim_sect32768   | 0     |
      | Innodb_num_pages_page_compressed         | 0     |
      | Innodb_num_page_compressed_trim_op       | 0     |
      | Innodb_num_page_compressed_trim_op_saved | 0     |
      | Innodb_num_pages_page_decompressed       | 0     |
      | Innodb_num_pages_page_compression_error  | 0     |
      | Innodb_defragment_compression_failures   | 0     |
      +------------------------------------------+-------+
      

      Why all the status still 0?
      I see the status of Compression is OFF.
      My step is it correct or not ?

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            jplindst Jan Lindström added a comment -

            Duplicate of MDEV-8250.

            Show
            jplindst Jan Lindström added a comment - Duplicate of MDEV-8250 .
            Hide
            jplindst Jan Lindström added a comment -

            Note that you need to insert at least one row and wait a while to get it asynchronously written to disk. Make sure that you have innodb-use-native-aio = 1.

            Show
            jplindst Jan Lindström added a comment - Note that you need to insert at least one row and wait a while to get it asynchronously written to disk. Make sure that you have innodb-use-native-aio = 1.

              People

              • Assignee:
                jplindst Jan Lindström
                Reporter:
                Daniel Cheung Daniel Cheung
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: