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

Memory not reuse and got OOM error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.6.22
    • N/A
    • Memory management
    • - MariaDB 10.6.22 running on RHEL 8 with 8vCPU and 32GB memory
      - Galera cluster with 2 DB nodes and 1 arbitrator
      - DB node 1 as a primary and DB node 2 as a slave such that all read/write operations are sent to node 1 only.

    Description

      I took the below scenario to repeat inserting 3M rows to a table in a single transaction (~ 1GB transaction) for every 20min and observed that the mariadb memory usage continued increased until system Out Of Memory.

      Scenario:
      1. create database test and create table t1(see attached sql file)
      2. restart both nodes one by one.
      3. setup cron job to load single_insert_t1_3M.sql file (see the zip file attached) to insert 3 million rows to table t1 by running mysql client( mysql .... < single_insert_t1_3M.sql) for every 20min.
      5. After about 6 hrs of running the cron job, the system memory usage went to 100% and got Out Of Memory error. The Mariadb process was killed then.
      6. The mariadb process memory usage record using "top" command (Please see top.txt) and the system memory usage graph ( Please see node1_mem.png and node2_mem.png) are attached for your reference.

      It seems the memory used by mariadb is not released or reuse though I repeated applying the same transaction. Is this memory usage behavior is normal? Is there any tuning in the mariadb to tackle this memory problem? Please advise.

      Attachments

        1. create_table_t1.sql
          0.9 kB
        2. mariadbd_top.txt
          118 kB
        3. my.cnf
          9 kB
        4. node1_mem.png
          node1_mem.png
          38 kB
        5. node2_mem.png
          node2_mem.png
          38 kB
        6. single_insert_t1_3M.sql.zip
          1.76 MB

        Activity

          People

            Unassigned Unassigned
            ktchow_ogcio Chow King Tak
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.