Details
-
Bug
-
Status: Closed (View Workflow)
-
Resolution: Fixed
-
None
-
None
-
None
Description
I tested MariaDB 5.5.23 with sysbench.
And that time, Aborted_clients metric value is not much grew up.
But, After I applied MariaDB to production database,
Aborted_clients is growing up ever even though normal close of client side.
So, I tested same code with MySQL 5.5.23 community version. But it's okay.
And, MariaDB(with ThreadPool)'s memory usage is really stable under 2GB(Buffer pool is not including)
when I test with sysbench.
But in real service (java application), memory usage is growing up over 6~7GB(without BufferPool).
I'm not sure Aborted_clients metric is related with this memory usage.
Could you check this out ?
Thanks.
after test status----------------------------------------------------------------------------------
root@localhost:(none) 10:22:10>show global status like 'Aborted_clients';
----------------------+
Variable_name | Value |
----------------------+
Aborted_clients | 100 |
----------------------+
mysql> show global status like 'Aborted_clients';
----------------------+
Variable_name | Value |
----------------------+
Aborted_clients | 0 |
----------------------+
test code --------------------------------------------------------------------------------------------
public class AbortedClientsTester {
public static void main(String[] args) throws Exception {
Connection[] conns = new Connection[100];
for(int idx=0; idx<100; idx++)
{ conns[idx] = getConnection(); }Thread.sleep(1000*10);
for(int idx=0; idx<100; idx++)
{ conns[idx].close(); }}
protected static Connection getConnection() throws Exception
{ String driver = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://127.0.0.1:3306/sysbench"; String uid = "sysbench"; String pwd = "sysbench"; Class.forName(driver).newInstance(); Connection conn = DriverManager.getConnection(url, uid, pwd); return conn; }}
Re: Aborted_clients metric is growing up even though formal connection close
Hi .
I think there is a misunderstanding about table cache size. This size is tiny compared to big buffers (Innodb bufferpool). The effect of bigger table cache is that you can run more transactions in parallel, because LOCK_open mutex is less hot. More work in parallel might well also increase resident set size (which you're tracking in your graphs).
There seems also to be misunderstanding about size of innodb buffer pool seen on the graphs. As you have seen the rss(resident set size) is not automatically >= innodb buffer pool size just when you start the database, because it is virtual memory that gets allocated and it is not the same as physical memory. so when innodb uses or touches pages first, virtual memory becomes physical memory used and resident size will grow until it reaches a plateau.
Pre-populating of Innodb buffer pool was done in a Twitter's MySQL branch : https://github.com/twitter/mysql/wiki/InnoDB-Startup-Options-and-System-Variables (innodb_buffer_pool_populate ), we might look to port it if there is enough interest in this patch