Comment 5 for bug 992983

Revision history for this message
Matt (brew74) wrote :

Hi Vladislav Vaintroub.

I tested table_open_cache parameter with sysbench (one table with 1000 partitions, 4000 connections).
And I attached memory usage graph. (memory usage is captured by "ps -oe rss" command)

Just a few hours, MariaDB took 6 GB except Innodb buffer pool on table_open_cache=4000 benchmark.
But that's not all. Finally MariaDB will takes over 18GB and use even swap space.
(same as MySQL 5.5.23 community's behaviors)
At that time, InnoDB engine use just 16GB memory (Including innodb dictionary).

So, MariaDB use only 15GB memory as buffer pool even though the machine has 32GB physical memory.
It seems that MariaDB (including MySQL Community) allocate memory for table cache,
but never free these memory even though connection is closed.

I also reported this message to MySQL Community bug reporting site.
They said "FLUSH TABLES" command. --;
I knew "FLUSH TABLES" command, but we can not run this command on production database server.

So, I'm wondering is there any to free the memory for table cache without blocking other sessions query.

I think a lot of people use mysql server with over 4000 connections and over 1000 tables.
I'm curios why these people doesn't care about this. And percona always said "set 80% of memory as Innodb buffer pool".

Thanks.
Regards,