<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: table_cache negative scalability</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/</link>
	<description>Percona&#039;s MySQL &#38; InnoDB performance and scalability blog</description>
	<lastBuildDate>Sat, 11 Feb 2012 16:45:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Chris Howells</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/comment-page-1/#comment-815350</link>
		<dc:creator>Chris Howells</dc:creator>
		<pubDate>Tue, 23 Aug 2011 10:39:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1754#comment-815350</guid>
		<description>This has bitten me once or twice too. It still seems to be an issue in the most recent Percona release of MySQL 5.5.14 too.

A patch has been written, have you thought about including it in Percona?

http://bugs.mysql.com/bug.php?id=49177
http://lists.mysql.com/commits/121507</description>
		<content:encoded><![CDATA[<p>This has bitten me once or twice too. It still seems to be an issue in the most recent Percona release of MySQL 5.5.14 too.</p>
<p>A patch has been written, have you thought about including it in Percona?</p>
<p><a href="http://bugs.mysql.com/bug.php?id=49177" rel="nofollow">http://bugs.mysql.com/bug.php?id=49177</a><br />
<a href="http://lists.mysql.com/commits/121507" rel="nofollow">http://lists.mysql.com/commits/121507</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shahryar Ghazi</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/comment-page-1/#comment-773520</link>
		<dc:creator>Shahryar Ghazi</dc:creator>
		<pubDate>Tue, 07 Sep 2010 19:21:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1754#comment-773520</guid>
		<description>we recently faced a similar issue so I wrote a tutorial here --&gt; http://www.geeksww.com/tutorials/database_management_systems/mysql/installation/mysql_tablecache_informationschema_and_open_files_limit.php</description>
		<content:encoded><![CDATA[<p>we recently faced a similar issue so I wrote a tutorial here &#8211;&gt; <a href="http://www.geeksww.com/tutorials/database_management_systems/mysql/installation/mysql_tablecache_informationschema_and_open_files_limit.php" rel="nofollow">http://www.geeksww.com/tutorials/database_management_systems/mysql/installation/mysql_tablecache_informationschema_and_open_files_limit.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DaveJ</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/comment-page-1/#comment-747574</link>
		<dc:creator>DaveJ</dc:creator>
		<pubDate>Wed, 14 Apr 2010 14:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1754#comment-747574</guid>
		<description>Great Post, Thank you all for your info.

Question:

After kicking off mk-table-checksum in the middle of the night I start getting errors such as:

100414  0:21:52 [ERROR] Error in accept: Too many open files
100414  0:21:52 [ERROR] /usr/local/mysql/bin/mysqld: Can&#039;t open file: &#039;./wc_miehr_posasmp/panel_decert.frm&#039; (errno: 24)
100414  0:21:52 [ERROR] /usr/local/mysql/bin/mysqld: Can&#039;t open file: &#039;./wc_miehr_posasmp/panel_decert.frm&#039; (errno: 24)


I have this many MyISAM tables:
[root@xxx /db/mydata]# find -L . -name &quot;*.MYI&quot;&#124;wc
  13713   13713  558523
  
Number of possible needed fd&#039;s: 13713 * 2 = 27426

I have this many InnoDB tables:
[root@xxx /db/mydata]# find -L . -name &quot;*.ibd&quot;&#124;wc  
  31014   31014 1144412
  
Innodb is handled differently right? So 31014 table handles are always opened?


If I add the two, 31014 + 27426 = 58440 os file descriptors.

So - 

1) Do I get errno: 24 becuase I have the open_files_limit set to 40000?
2) Could you explain the difference between MyISAM and InnoDB table cache?
3) Would converting the MyISAM tables to InnoDB fix or help the os ulimit max open tables issue?

Thanks for your help!



Server info:

Server version: 5.0.79-enterprise-log MySQL Enterprise Server (Commercial)

my.cnf:

[mysqld]
server-id               = 2
port                    = 3306
basedir                 = /usr/local/mysql
datadir                 = /db/mydata
tmpdir                  = /db-logs/ibdlogs/dbtmp
pid-file                = /db/mysql.pid
log-error               = /db/mysql.err
log-slow-queries        = /db/slow-queries.log
log-bin                 = /db-logs/bin-logs/mysql-logs/mysql-bin
expire_logs_days        = 30 # Expire logs after in X days.
long_query_time         = 2
thread_cache_size       = 100
max_connections         = 400
table_cache             = 20000
open_files_limit        = 40000
max_binlog_size         = 500M
max_allowed_packet      = 20M
tmp_table_size          = 100M
max_heap_table_size     = 100M
query_cache_size        = 100M
default_table_type      = MYISAM
log_long_format

# Innodb
innodb_status_file               = 1
innodb_file_per_table            = 1
innodb_data_home_dir             = /db2/innodb
innodb_log_group_home_dir        = /db-logs/ibdlogs
innodb_data_file_path            = ibdata1:10M:autoextend
innodb_buffer_pool_size          = 30G
innodb_log_buffer_size           = 8M
innodb_additional_mem_pool_size  = 8M
innodb_log_file_size             = 256M
innodb_log_files_in_group        = 2
innodb_thread_concurrency        = 16
innodb_open_files                = 20000
innodb_flush_method              = O_DIRECT
innodb_flush_log_at_trx_commit   = 2
transaction_isolation            = READ-COMMITTED</description>
		<content:encoded><![CDATA[<p>Great Post, Thank you all for your info.</p>
<p>Question:</p>
<p>After kicking off mk-table-checksum in the middle of the night I start getting errors such as:</p>
<p>100414  0:21:52 [ERROR] Error in accept: Too many open files<br />
100414  0:21:52 [ERROR] /usr/local/mysql/bin/mysqld: Can&#8217;t open file: &#8216;./wc_miehr_posasmp/panel_decert.frm&#8217; (errno: 24)<br />
100414  0:21:52 [ERROR] /usr/local/mysql/bin/mysqld: Can&#8217;t open file: &#8216;./wc_miehr_posasmp/panel_decert.frm&#8217; (errno: 24)</p>
<p>I have this many MyISAM tables:<br />
[root@xxx /db/mydata]# find -L . -name &#8220;*.MYI&#8221;|wc<br />
  13713   13713  558523</p>
<p>Number of possible needed fd&#8217;s: 13713 * 2 = 27426</p>
<p>I have this many InnoDB tables:<br />
[root@xxx /db/mydata]# find -L . -name &#8220;*.ibd&#8221;|wc<br />
  31014   31014 1144412</p>
<p>Innodb is handled differently right? So 31014 table handles are always opened?</p>
<p>If I add the two, 31014 + 27426 = 58440 os file descriptors.</p>
<p>So &#8211; </p>
<p>1) Do I get errno: 24 becuase I have the open_files_limit set to 40000?<br />
2) Could you explain the difference between MyISAM and InnoDB table cache?<br />
3) Would converting the MyISAM tables to InnoDB fix or help the os ulimit max open tables issue?</p>
<p>Thanks for your help!</p>
<p>Server info:</p>
<p>Server version: 5.0.79-enterprise-log MySQL Enterprise Server (Commercial)</p>
<p>my.cnf:</p>
<p>[mysqld]<br />
server-id               = 2<br />
port                    = 3306<br />
basedir                 = /usr/local/mysql<br />
datadir                 = /db/mydata<br />
tmpdir                  = /db-logs/ibdlogs/dbtmp<br />
pid-file                = /db/mysql.pid<br />
log-error               = /db/mysql.err<br />
log-slow-queries        = /db/slow-queries.log<br />
log-bin                 = /db-logs/bin-logs/mysql-logs/mysql-bin<br />
expire_logs_days        = 30 # Expire logs after in X days.<br />
long_query_time         = 2<br />
thread_cache_size       = 100<br />
max_connections         = 400<br />
table_cache             = 20000<br />
open_files_limit        = 40000<br />
max_binlog_size         = 500M<br />
max_allowed_packet      = 20M<br />
tmp_table_size          = 100M<br />
max_heap_table_size     = 100M<br />
query_cache_size        = 100M<br />
default_table_type      = MYISAM<br />
log_long_format</p>
<p># Innodb<br />
innodb_status_file               = 1<br />
innodb_file_per_table            = 1<br />
innodb_data_home_dir             = /db2/innodb<br />
innodb_log_group_home_dir        = /db-logs/ibdlogs<br />
innodb_data_file_path            = ibdata1:10M:autoextend<br />
innodb_buffer_pool_size          = 30G<br />
innodb_log_buffer_size           = 8M<br />
innodb_additional_mem_pool_size  = 8M<br />
innodb_log_file_size             = 256M<br />
innodb_log_files_in_group        = 2<br />
innodb_thread_concurrency        = 16<br />
innodb_open_files                = 20000<br />
innodb_flush_method              = O_DIRECT<br />
innodb_flush_log_at_trx_commit   = 2<br />
transaction_isolation            = READ-COMMITTED</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DaveJ</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/comment-page-1/#comment-747567</link>
		<dc:creator>DaveJ</dc:creator>
		<pubDate>Wed, 14 Apr 2010 13:44:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1754#comment-747567</guid>
		<description>Great Post, Thank you all for your info.

Question:

After kicking off mk-table-checksum in the middle of the night I start getting errors such as:

100414  0:21:52 [ERROR] Error in accept: Too many open files
100414  0:21:52 [ERROR] /usr/local/mysql/bin/mysqld: Can&#039;t open file: &#039;./wc_miehr_posasmp/panel_decert.frm&#039; (errno: 24)
100414  0:21:52 [ERROR] /usr/local/mysql/bin/mysqld: Can&#039;t open file: &#039;./wc_miehr_posasmp/panel_decert.frm&#039; (errno: 24)

[root@wcdb /db]# perror 24
OS error code  24:  Too many open files

I have this many MyISAM tables:

[root@xxx /db/mydata]# find -L . -name &quot;*.MYI&quot;&#124;wc
  13713   13713  558523
  
Number of possible needed fd&#039;s: 13713 * 2 = 27426

I have this many InnoDB tables:

[root@xxx /db/mydata]# find -L . -name &quot;*.ibd&quot;&#124;wc  
  31014   31014 1144412
  
Innodb is handled differently right? So 31014 table handles are always opened and would not be the cause of the errno: 24?

If I add the two, 31014 + 27426 = 58440 os file descriptors.

So - 

1) Do I get errno: 24 becuase I have the open_files_limit set to 40000?
2) Could you explain the difference between MyISAM and InnoDB and the difference in how the OS handles opened files?
3) Would converting the MyISAM tables to InnoDB fix or help the os ulimit max open tables issue?

Thanks for your help!

Server info:

Server version: 5.0.79-enterprise-log MySQL Enterprise Server (Commercial)

my.cnf:

[mysqld]
server-id               = 2
port                    = 3306
basedir                 = /usr/local/mysql
datadir                 = /db/mydata
tmpdir                  = /db-logs/ibdlogs/dbtmp
pid-file                = /db/mysql.pid
log-error               = /db/mysql.err
log-slow-queries        = /db/slow-queries.log
log-bin                 = /db-logs/bin-logs/mysql-logs/mysql-bin
expire_logs_days        = 30 # Expire logs after in X days.
long_query_time         = 2
thread_cache_size       = 100
max_connections         = 400
table_cache             = 20000
open_files_limit        = 40000
max_binlog_size         = 500M
max_allowed_packet      = 20M
tmp_table_size          = 100M
max_heap_table_size     = 100M
query_cache_size        = 100M
default_table_type      = MYISAM
log_long_format

# Innodb
innodb_status_file               = 1
innodb_file_per_table            = 1
innodb_data_home_dir             = /db2/innodb
innodb_log_group_home_dir        = /db-logs/ibdlogs
innodb_data_file_path            = ibdata1:10M:autoextend
innodb_buffer_pool_size          = 30G
innodb_log_buffer_size           = 8M
innodb_additional_mem_pool_size  = 8M
innodb_log_file_size             = 256M
innodb_log_files_in_group        = 2
innodb_thread_concurrency        = 16
innodb_open_files                = 20000
innodb_flush_method              = O_DIRECT
innodb_flush_log_at_trx_commit   = 2
transaction_isolation            = READ-COMMITTED</description>
		<content:encoded><![CDATA[<p>Great Post, Thank you all for your info.</p>
<p>Question:</p>
<p>After kicking off mk-table-checksum in the middle of the night I start getting errors such as:</p>
<p>100414  0:21:52 [ERROR] Error in accept: Too many open files<br />
100414  0:21:52 [ERROR] /usr/local/mysql/bin/mysqld: Can&#8217;t open file: &#8216;./wc_miehr_posasmp/panel_decert.frm&#8217; (errno: 24)<br />
100414  0:21:52 [ERROR] /usr/local/mysql/bin/mysqld: Can&#8217;t open file: &#8216;./wc_miehr_posasmp/panel_decert.frm&#8217; (errno: 24)</p>
<p>[root@wcdb /db]# perror 24<br />
OS error code  24:  Too many open files</p>
<p>I have this many MyISAM tables:</p>
<p>[root@xxx /db/mydata]# find -L . -name &#8220;*.MYI&#8221;|wc<br />
  13713   13713  558523</p>
<p>Number of possible needed fd&#8217;s: 13713 * 2 = 27426</p>
<p>I have this many InnoDB tables:</p>
<p>[root@xxx /db/mydata]# find -L . -name &#8220;*.ibd&#8221;|wc<br />
  31014   31014 1144412</p>
<p>Innodb is handled differently right? So 31014 table handles are always opened and would not be the cause of the errno: 24?</p>
<p>If I add the two, 31014 + 27426 = 58440 os file descriptors.</p>
<p>So &#8211; </p>
<p>1) Do I get errno: 24 becuase I have the open_files_limit set to 40000?<br />
2) Could you explain the difference between MyISAM and InnoDB and the difference in how the OS handles opened files?<br />
3) Would converting the MyISAM tables to InnoDB fix or help the os ulimit max open tables issue?</p>
<p>Thanks for your help!</p>
<p>Server info:</p>
<p>Server version: 5.0.79-enterprise-log MySQL Enterprise Server (Commercial)</p>
<p>my.cnf:</p>
<p>[mysqld]<br />
server-id               = 2<br />
port                    = 3306<br />
basedir                 = /usr/local/mysql<br />
datadir                 = /db/mydata<br />
tmpdir                  = /db-logs/ibdlogs/dbtmp<br />
pid-file                = /db/mysql.pid<br />
log-error               = /db/mysql.err<br />
log-slow-queries        = /db/slow-queries.log<br />
log-bin                 = /db-logs/bin-logs/mysql-logs/mysql-bin<br />
expire_logs_days        = 30 # Expire logs after in X days.<br />
long_query_time         = 2<br />
thread_cache_size       = 100<br />
max_connections         = 400<br />
table_cache             = 20000<br />
open_files_limit        = 40000<br />
max_binlog_size         = 500M<br />
max_allowed_packet      = 20M<br />
tmp_table_size          = 100M<br />
max_heap_table_size     = 100M<br />
query_cache_size        = 100M<br />
default_table_type      = MYISAM<br />
log_long_format</p>
<p># Innodb<br />
innodb_status_file               = 1<br />
innodb_file_per_table            = 1<br />
innodb_data_home_dir             = /db2/innodb<br />
innodb_log_group_home_dir        = /db-logs/ibdlogs<br />
innodb_data_file_path            = ibdata1:10M:autoextend<br />
innodb_buffer_pool_size          = 30G<br />
innodb_log_buffer_size           = 8M<br />
innodb_additional_mem_pool_size  = 8M<br />
innodb_log_file_size             = 256M<br />
innodb_log_files_in_group        = 2<br />
innodb_thread_concurrency        = 16<br />
innodb_open_files                = 20000<br />
innodb_flush_method              = O_DIRECT<br />
innodb_flush_log_at_trx_commit   = 2<br />
transaction_isolation            = READ-COMMITTED</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kostja</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/comment-page-1/#comment-693930</link>
		<dc:creator>Kostja</dc:creator>
		<pubDate>Thu, 10 Dec 2009 22:24:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1754#comment-693930</guid>
		<description>And as you can see from the analysis in the bug report, this is not a table cache problem, but a MyISAM one.</description>
		<content:encoded><![CDATA[<p>And as you can see from the analysis in the bug report, this is not a table cache problem, but a MyISAM one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Callaghan</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/comment-page-1/#comment-686459</link>
		<dc:creator>Mark Callaghan</dc:creator>
		<pubDate>Sat, 28 Nov 2009 18:02:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1754#comment-686459</guid>
		<description>@Sergei - I want it fixed and I shared that with MySQL.

@Peter - whether or not Innodb keeps a file descriptor open for the tablespace, index cardinality stats (~8 leaf blocks per index) are sampled when MySQL creates a table handler instance for an InnoDB table. That is the cost I mentioned above.</description>
		<content:encoded><![CDATA[<p>@Sergei &#8211; I want it fixed and I shared that with MySQL.</p>
<p>@Peter &#8211; whether or not Innodb keeps a file descriptor open for the tablespace, index cardinality stats (~8 leaf blocks per index) are sampled when MySQL creates a table handler instance for an InnoDB table. That is the cost I mentioned above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergei Golubchik</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/comment-page-1/#comment-686203</link>
		<dc:creator>Sergei Golubchik</dc:creator>
		<pubDate>Sat, 28 Nov 2009 08:19:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1754#comment-686203</guid>
		<description>I see, you didn&#039;t bother to submit a bug report about it.

Am I the only reader of your blog that want this fixed ?
http://bugs.mysql.com/49177</description>
		<content:encoded><![CDATA[<p>I see, you didn&#8217;t bother to submit a bug report about it.</p>
<p>Am I the only reader of your blog that want this fixed ?<br />
<a href="http://bugs.mysql.com/49177" rel="nofollow">http://bugs.mysql.com/49177</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/comment-page-1/#comment-682933</link>
		<dc:creator>Igor</dc:creator>
		<pubDate>Mon, 23 Nov 2009 22:38:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1754#comment-682933</guid>
		<description>I think table_cache values between 1,000 and 5,000 are of much higher practical relevance for vast majority of MySQL users (those that are not hosting providers etc).</description>
		<content:encoded><![CDATA[<p>I think table_cache values between 1,000 and 5,000 are of much higher practical relevance for vast majority of MySQL users (those that are not hosting providers etc).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wagner Bianchi</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/comment-page-1/#comment-682078</link>
		<dc:creator>Wagner Bianchi</dc:creator>
		<pubDate>Sun, 22 Nov 2009 17:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1754#comment-682078</guid>
		<description>Maybe this number is tiny compared with the number up on the test did by Peter. That was 100.000.

Regards.</description>
		<content:encoded><![CDATA[<p>Maybe this number is tiny compared with the number up on the test did by Peter. That was 100.000.</p>
<p>Regards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/comment-page-1/#comment-682070</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sun, 22 Nov 2009 16:51:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1754#comment-682070</guid>
		<description>I don&#039;t think 853 tables is tiny.  Why so many?  Are some of them duplicates providing duplicate funtionality to different groups of users?  Why not combine like data in a single table for all users?  Or am I missing something?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think 853 tables is tiny.  Why so many?  Are some of them duplicates providing duplicate funtionality to different groups of users?  Why not combine like data in a single table for all users?  Or am I missing something?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

