Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-5437

MyRocks - Not getting more than one immutable memtable when setting MIN_WRITE_BUFFER_NUMBER_TO_MERGE to more than 1

    Details

    • Type: Bug
    • Status: On Hold
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: Not 5.6, 5.7.25-28, 8.0.13-4
    • Fix Version/s: None
    • Component/s: MyRocks
    • Labels:
      None
    • Environment:

      Same pt-summary and pt-mysql-summary as other created tickets. Example can be found here...

      https://jira.percona.com/browse/PS-5425

      Description

      I have altered the rocksdb_default_cf_options variable to include a setting for MIN_WRITE_BUFFER_NUMBER_TO_MERGE for my test column family. Per the documentation found here...

      https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide#flushing-options

      I should be able to create multiple memtables prior to a flush, however this doesn't appear to be the case.

      As you can see below I set the value to 4. I started loading data into my column family and you can see from the output of information_schema.ROCKSDB_CFSTATS I never got more than one immutable memtable.

      mysql> select * from information_schema.ROCKSDB_CF_OPTIONS cfo where cfo.CF_NAME = 'cf_t1' and cfo.OPTION_TYPE IN ('MIN_WRITE_BUFFER_NUMBER_TO_MERGE', 'WRITE_BUFFER_SIZE');
      +---------+----------------------------------+-----------+
      | CF_NAME | OPTION_TYPE                      | VALUE     |
      +---------+----------------------------------+-----------+
      | cf_t1   | WRITE_BUFFER_SIZE                | 100663296 |
      | cf_t1   | MIN_WRITE_BUFFER_NUMBER_TO_MERGE | 4         |
      +---------+----------------------------------+-----------+
      2 rows in set (0.01 sec)
      
      mysql> select * from information_schema.ROCKSDB_CF_OPTIONS cfo where cfo.CF_NAME = 'cf_t1' and cfo.OPTION_TYPE IN ('MIN_WRITE_BUFFER_NUMBER_TO_MERGE', 'WRITE_BUFFER_SIZE');
      +---------+----------------------------------+----------+
      | CF_NAME | OPTION_TYPE                      | VALUE    |
      +---------+----------------------------------+----------+
      | cf_t1   | WRITE_BUFFER_SIZE                | 33554432 |
      | cf_t1   | MIN_WRITE_BUFFER_NUMBER_TO_MERGE | 4        |
      +---------+----------------------------------+----------+
      2 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+-------+
      | CF_NAME | STAT_TYPE                     | VALUE |
      +---------+-------------------------------+-------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |     0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |     0 |
      | cf_t1   | COMPACTION_PENDING            |     0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     |   800 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       |   800 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     0 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |     0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |     0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |     1 |
      +---------+-------------------------------+-------+
      9 rows in set (0.00 sec)mysql> #started data writemysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+-------+
      | CF_NAME | STAT_TYPE                     | VALUE |
      +---------+-------------------------------+-------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |     0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |     0 |
      | cf_t1   | COMPACTION_PENDING            |     0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     |   800 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       |   800 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     0 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |     0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |     0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |     1 |
      +---------+-------------------------------+-------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+-------+
      | CF_NAME | STAT_TYPE                     | VALUE |
      +---------+-------------------------------+-------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |     0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |     0 |
      | cf_t1   | COMPACTION_PENDING            |     0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     |   800 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       |   800 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     0 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |     0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |     0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |     1 |
      +---------+-------------------------------+-------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+---------+
      | CF_NAME | STAT_TYPE                     | VALUE   |
      +---------+-------------------------------+---------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |       0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |       0 |
      | cf_t1   | COMPACTION_PENDING            |       0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 2339336 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 2339336 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    1000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |       0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |       0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |       1 |
      +---------+-------------------------------+---------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+---------+
      | CF_NAME | STAT_TYPE                     | VALUE   |
      +---------+-------------------------------+---------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |       0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |       0 |
      | cf_t1   | COMPACTION_PENDING            |       0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 4677984 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 4677984 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    2000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |       0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |       0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |       1 |
      +---------+-------------------------------+---------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+---------+
      | CF_NAME | STAT_TYPE                     | VALUE   |
      +---------+-------------------------------+---------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |       0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |       0 |
      | cf_t1   | COMPACTION_PENDING            |       0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 8183680 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 8183680 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    3500 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |       0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |       0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |       1 |
      +---------+-------------------------------+---------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 10522288 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 10522288 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     4500 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 12860848 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 12860848 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     5500 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 15197872 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 15197872 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     6500 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 16366528 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 16366528 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     7000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 18705264 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 18705264 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     8000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 19873888 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 19873888 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     8500 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 23381064 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 23381064 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    10000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 25719520 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 25719520 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    11000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 28056512 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 28056512 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    12000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 29224976 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 29224976 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    12500 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 32732256 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 32732256 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    14000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+---------+
      | CF_NAME | STAT_TYPE                     | VALUE   |
      +---------+-------------------------------+---------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |       0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |       0 |
      | cf_t1   | COMPACTION_PENDING            |       0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 2339096 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 2339096 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    1000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |       0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |       0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |       1 |
      +---------+-------------------------------+---------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+---------+
      | CF_NAME | STAT_TYPE                     | VALUE   |
      +---------+-------------------------------+---------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |       0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |       0 |
      | cf_t1   | COMPACTION_PENDING            |       0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 5846496 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 5846496 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    2500 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |       0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |       0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |       1 |
      +---------+-------------------------------+---------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+---------+
      | CF_NAME | STAT_TYPE                     | VALUE   |
      +---------+-------------------------------+---------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |       0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |       0 |
      | cf_t1   | COMPACTION_PENDING            |       0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 9353648 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 9353648 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |    4000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |       0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |       0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |       1 |
      +---------+-------------------------------+---------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 11690832 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 11690832 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     5000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 14029376 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 14029376 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     6000 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> select * from information_schema.ROCKSDB_CFSTATS cfs where cfs.CF_NAME = 'cf_t1';
      +---------+-------------------------------+----------+
      | CF_NAME | STAT_TYPE                     | VALUE    |
      +---------+-------------------------------+----------+
      | cf_t1   | NUM_IMMUTABLE_MEM_TABLE       |        0 |
      | cf_t1   | MEM_TABLE_FLUSH_PENDING       |        0 |
      | cf_t1   | COMPACTION_PENDING            |        0 |
      | cf_t1   | CUR_SIZE_ACTIVE_MEM_TABLE     | 22212400 |
      | cf_t1   | CUR_SIZE_ALL_MEM_TABLES       | 22212400 |
      | cf_t1   | NUM_ENTRIES_ACTIVE_MEM_TABLE  |     9500 |
      | cf_t1   | NUM_ENTRIES_IMM_MEM_TABLES    |        0 |
      | cf_t1   | NON_BLOCK_CACHE_SST_MEM_USAGE |        0 |
      | cf_t1   | NUM_LIVE_VERSIONS             |        1 |
      +---------+-------------------------------+----------+
      9 rows in set (0.00 sec)mysql> exit
      Bye
      

      I believe the documentation is correct in the sense that MIN_WRITE_BUFFER_NUMBER_TO_MERGE should control the number of immutable memtables required prior to a flush, but this doesn't appear to be the case in my testing.

      Thanks!

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Sylvester Peter Sylvester
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: