Run multiple INSERT values (data),(data)...(data) allocates too much memory
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Invalid
|
Undecided
|
Unassigned | |||
5.7 |
Invalid
|
Medium
|
Vlad Lesin |
Bug Description
Hi,
I would like you to test one problem I was able to reproduce and it is completely compatible with the scenario described here.
I reproduced the memory growth with and without libjemalloc lib in use.
How I reproduced a memory issue that can be related to this one.
1) Startup a new Percona Server Instance (5.6 or 5.7, I think both are affected) I used 5.6.36.
2) Setup only 1 variable in my.cnf: max_allowed_
3) Create a dummy table like this one:
create database db;
use db;
create table db.dummy (acol bigint, anything varchar(256)) engine=innodb;
4) Create a SQL file (load_test.sql) like this one:
INSERT INTO db.dummy VALUES
(1,'This is a dummy value'),
(1,'This is a dummy value'),
...
(1,'This is a dummy value');
5) Repeat the values until you reach a file size bigger than 64MB. It needs to be bigger than 64MB and smaller then max_allowed_packet.
6) Take note of memory allocation and how it is.
7) Run the following:
mysql db < load_test.sql ; vmstat -S m 2 100
This might cause mysqld memory to explode! Run with bigger file size, bigger max_allowed_packet if needed.
Changed in percona-server: | |
assignee: | nobody → Sveta Smirnova (svetasmirnova) |
tags: | added: i201617 i207866 |
This problem also affected my company too.