MySQL 5.7 on Ubuntu 14.04 – Resolving High RAM Usage

memoryMySQLmysql-5.7Ubuntu

I've recently installed MySQL 5.7.11 in my Ubuntu 14.04.3 system following these instructions: http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/

Being totally empty and not being called by any other program, it always ramps up RAM usage in a couple of hours until I can't start Node apps because of low memory (ENOMEM). I first assumed it to be because I'm running on a 768MB VPS, so I tweaked my.cnf, using some very low parameters, but it kept behaving like that, eating up more than 600MB of RAM after a couple of hours.

Please notice that it's really taking up all that RAM, it's not some buffer/cache voodoo, because it stops other programs from starting. Or am I wrong here?

Just uninstalled everything and reinstalled MySQL 5.6 and this problem isn't happening. Can anyone lend me a hand here? Am I doing something wrong or is this some kind of bug?

Thanks!

Best Answer

It's not your configuration; it's caused by the bug Excessive memory used in memory/innodb/os0file starting 5.7.8.

It is tracked in Ubuntu as Excessive consumption RAM of mysqld daemon in Ubuntu 16.04, and there is also a discussion on Reddit.