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

On Open Suse Linux, Mariadb Server does not deallocate memory when it should

    XMLWordPrintable

Details

    • Bug
    • Status: Needs Feedback (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • 10.5, 10.6
    • None
    • None

    Description

      Tested with 10.11.9-MariaDB-log on openSUSE Leap 15.6.

      I use the following global variables to make this possible:

      innodb_buffer_pool_size = 1073741824
      max_heap_table_size =  10737418240
      

      Create a schema and a table to test memory allocation and deallocation:

      drop schema if exists memtest; 
      create schema if not exists memtest; use memtest;
      CREATE TABLE `BIGMEMORY`(`col1` int(11) NOT NULL AUTO_INCREMENT,`col2` varchar(1024) DEFAULT NULL,PRIMARY KEY (`col1`)) ENGINE=MEMORY;
      

      Insert ROWS:

      insert into memtest.BIGMEMORY (col2) 
      select concat(md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand())) 
      from seq_1_to_358400;
      

      View memory usage with top comand. Examples:

      top -b -n 1 -p $(pidof mariadbd) | tail -2
      top -b -n 1 -p $(pidof mysqld) | tail -2
      top -b -n 1 -p 21111 | tail -2
      

      Truncate or drop the table. This should deallocate memory used by instance.

      View memory usage with top command again.

      Attachments

        Activity

          People

            Unassigned Unassigned
            edward Edward Stoever
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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