Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.6.22
-
- 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.