5

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!

  • show global variables; and add the output here or for starters feed it to mysqlcalculator.com . 5.7 probably changed some defaults. – jkavalik Feb 16 '16 at 13:51
  • Here we go: gist.github.com/vctfernandes/bcdd2c06b03841b1ec3d. According to mysqlcalculator.com, it should be using no more than 457.84 MB (assuming innodb_additional_mem_pool_size = 1MB, apparently this paramter doesn't exist anymore in 5.7...) – Vitor Feb 17 '16 at 21:00
  • Strange thing was that using the mysqlcalculator.com to thin out memory usage to ~150MB, it kept going to over 600MB... – Vitor Feb 17 '16 at 21:03
  • I've tried again in another VPS with 1GB RAM and Ubuntu 14.04. Here's what I did: OS upgrade; Mysql instal and nothing else. It's up to 700.1 MB of RAM after a day. – Vitor Feb 18 '16 at 18:57
  • Did you found any fix? I have the same issues, I have upgraded some of my VPS to mysql5.7, and now all got memory problems... I also installed mysqltuner to see if there is something to fix, but there wasn't much info there. – Alex Feb 27 '16 at 6:01
3

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.

  • This should now be fixed with the latest security updates. – colan Dec 30 '16 at 0:56
3

MySQL 5.7.13 is OK

I was suffering from this problem. Same as you described: MySQL 5.7.11 with almost empty database and few requests in hour was eating memory up to 450MB.

So I've recently tried new version and it is totally OK. MySQL 5.7.13 instance is running for a week already and it takes only 73MB.

Also I've turned off performance schema in my.cnf:

            [mysqld]
            performance_schema=0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.