2

I have VPS with 2GB of RAM running Ubuntu. There are three sites using database on this server - two on WordPress and one on custom script. All of them get max few hits per day.

MySQL always had pretty high RAM usage - usually something around 25%. It's not that much but it looked weird compared to other processes using 1% or 2%.

Today I upgraded OS to Ubuntu 16.04 and now MySQL uses even more RAM - currently it's stuck at 42%.

My question is: is it normal? There are lot of posts about minimizing memory usage by MySQL but I don't know if it's necessary. After all half of RAM is still empty.

Here is a picture of htop

1
  • 1
    Databases always like to use RAM. Anyway you have plenty available! May 14, 2016 at 20:56

2 Answers 2

4

No, it is not normal. It is 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.

0

To explain the difference, you would need to compare the current MySQL configuration with the previous one.

Look at /etc/mysql/my.cnf for the different allocated buffer sizes. On most configurations, the biggest would be the innodb_buffer_pool_size.

3
  • All I have in /etc/mysql/my.cnf are two !includedir directives and in these included directories there are only files with few lines (sometimes even one). I can't find any file with full configuration and option you mentioned.
    – sajran
    May 14, 2016 at 21:54
  • You could use mysqltuner to consult the current configuration. You can install it with sudo apt install mysqltuner. May 14, 2016 at 22:11
  • mysqltuner looks interesting but it says: Maximum reached memory usage: 196.2M (10.05% of installed RAM. Maximum possible memory usage: 352.4M (18.05% of installed RAM) which is obviously not true.
    – sajran
    May 15, 2016 at 8:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .