Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17874

MyRocks-Gap-Lock: Lock memory overhead

Details

    Description

      Several MyRocks tests currently fail, because they reach rocksdb_max_lock_memory and lock escalation is unable to reduce memory usage.

      One example is autoinc_vars_thread_2. AUTO_INCREMENT values are generated by each thread using auto_increment_offset which causes all adjacent row locks to belong to different transactions.

      Attachments

        Issue Links

          Activity

            in spetrunia/mysql-5.6-rangelocking

            toku::concurrent_tree::get_insertion_memory_overhead()=176
            

            in Percona Server:

             
            toku::concurrent_tree::get_insertion_memory_overhead()=192
            

            Add to that keyrange::get_memory_size() which is (sizeof(key_range)=72) + left_key_size +right_key_size (they are intentionally counted twice).

            In total, for pk INT PRIMARY KEY the lock memory usage is 264 bytes in 5.6-rangelocking (debug build) and 274 in debug build of Percona Server.

            psergei Sergei Petrunia added a comment - in spetrunia/mysql-5.6-rangelocking toku::concurrent_tree::get_insertion_memory_overhead()=176 in Percona Server: toku::concurrent_tree::get_insertion_memory_overhead()=192 Add to that keyrange::get_memory_size() which is (sizeof(key_range)=72) + left_key_size +right_key_size (they are intentionally counted twice). In total, for pk INT PRIMARY KEY the lock memory usage is 264 bytes in 5.6-rangelocking (debug build) and 274 in debug build of Percona Server.

            In Percona Server's MTR environment: tokudb_max_lock_memory is not set, so tokudb_init_func sets it to 1/8 th of tokudb-cache-size which is 512M, so we get 64M.

            In MariaDB, the default value is tokudb_max_lock_memory = 1 035 604 992= 1G

            psergei Sergei Petrunia added a comment - In Percona Server's MTR environment: tokudb_max_lock_memory is not set, so tokudb_init_func sets it to 1/8 th of tokudb-cache-size which is 512M, so we get 64M. In MariaDB, the default value is tokudb_max_lock_memory = 1 035 604 992= 1G

            People

              psergei Sergei Petrunia
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.