数据库升级mysql5.6.15后 ,默认占用内存达400多M,  而原来使用的5.0 只有几十M..


解决方法:修改 my.ini 中以下参数

table_definition_cache=400


修改后,mysql5.6就只使用 60M左右的内存了.

这个BUG有人测试过:
http://bugs.mysql.com/bug.php?id=68287

** Test 1 **

my.cnf contains only:

> [mysqld]
> table_definition_cache = 800
> table_open_cache = 4000
> open_files_limit = 9999

=> memory usage as reported by TaskManager (Working Set) = 163 Mb

** Test 2 **

my.cnf contains only:

> [mysqld]
> table_definition_cache = 801
> table_open_cache = 4000
> open_files_limit = 9999

=> memory usage as reported by TaskManager (Working Set) = 484 MB

** Test 3 **

my.cnf contains only:

> [mysqld]
> table_definition_cache = 800
> table_open_cache = 4001
> open_files_limit = 9999

=> memory usage as reported by TaskManager (Working Set) = 484 MB

** Test 4 **

my.cnf contains only:

> [mysqld]
> table_definition_cache = 801
> table_open_cache = 4001
> open_files_limit = 9999

=> memory usage reported by TaskManager (Working Set) = 484 MB

(actual readings rounded to the MB)

Environment: Windows 7 32bit, MySQL 5.6.14 from mysql-5.6.14-win32.zip
服务器设置 | 评论(0) | 引用(0) | 阅读(1333)
 
发表评论
   
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]