Public bug reported:
Mysql gradually consumes memory . The memory is never released back to OS . The
easiest way to reproduce the issue is run few mysqldumps and observe memory
usage.
I used :
mysqldump DB1 > /dev/null &
About 5-6 times.
After dumps are completed mysql do not release memory and continue to consume
even more memory.
Mysqld process uses all system memory, then starts to use swap memory up to the
point where the database is killed by OOM errors.
here is memory usage after few mysqldumps commands :
ps -aux | grep mysql
mysql 607 0.7 49.0 1769788 1005184 ? Ssl Aug10 10:50
/usr/sbin/mysqld
1GB on a system with 128MB innodb buffer pool. Performance schema does
not report any issues and states that myslq is taking only around 400MB
.
The issue seems to be related to the default memory allocation library malloc.
Installing jemmalloc and forcing jemmalloc in mysql conf seems to resolve this
issue .
I used the same method as described before and memory usage looks stable :
ps uax | grep mysql
mysql 1540 5.9 23.4 957244 481036 ? Ssl 12:59 4:38
/usr/sbin/mysqld
Same issue and workaround was reported on mysql bug forum by Machiel Richards .
lsb_release -rd
Description: Ubuntu 16.04.2 LTS
Release: 16.04
mysql-server:
Installed: 5.7.19-0ubuntu0.16.04.1
Candidate: 5.7.19-0ubuntu0.16.04.1
Version table:
*** 5.7.19-0ubuntu0.16.04.1 500
500 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64
Packages
500 http://de.archive.ubuntu.com/ubuntu xenial-security/main amd64
Packages
100 /var/lib/dpkg/status
5.7.11-0ubuntu6 500
500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
** Affects: mysql-5.7 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1710146
Title:
mysql never realase memory
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1710146/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs