Percona 5.6 memory usage

I'm not sure if the stack is the right place to ask about this, but I recently upgraded to Percona 5.6 from 5.5 and my memory usage has increased dramatically!

This is from PS:

mysql 4598 0.0 29.5 1583356 465312 ? Sl Oct17 9:07 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib6 

I use dedicated VSS

My server has only a gadget ... how is it that only 30% memory usage according to PS?

I have a ram in the settings to be smaller than this, and when I start MySQLTuner, I get:

 [OK] Maximum possible memory usage: 338.9M (22% of installed RAM) 

So, how do I use almost 500 MB of physical memory and more than half of the virtual?

Is this a bug in mySQL or something with my server?

+6
source share
3 answers

it turned out that in mysql 5.6 the performance_schema function is enabled by default. It was disabled by default earlier in 5.5 and earlier. It has been enabled by default since 5.6.6

performance_schema = off in my configuration file fixes the problem.

I would suggest that anyone who does not have memory to run performance_schema will not use it anyway.

This may affect other mysql 5.6.6 distributions.

+8
source

I had this problem and fixing several (increased) cache values ​​in MySQL.ini sorted the problem.

table_definition_cache - set to 400

From " http://bugs.mysql.com/bug.php?id=68287 " where it is discussed

Yes, there are threshold values ​​based on table_open_cache and table_definition_cache and max_connections and the intersection of threshold values, which leads to a large increase in RAM used. Thresholds work by first determining if the server size is small, medium, or large.

Small: all three are the same or less than the default values ​​(2000, 400, 151). Large: any of the three more than doubles the default value. Medium: others.

From memory. mine was installed on 2000+, and its removal was fixed.

+2
source

What helped me on CentOS was changing the memory allocator:

 yum install jemalloc-devel 

and add to my.cnf:

 [mysqld_safe] malloc-lib = /usr/lib64/libjemalloc.so.1 
0
source

Source: https://habr.com/ru/post/956656/


All Articles