[ 2014/01/13 12:07 | by 孤城浪子 ]
|
解决方法:修改 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