我在服务器上运行了一个mysql导入mysql dummyctrad < dumpfile.sql,并且它需要很长时间才能完成。转储文件大约5G。服务器的centos 6内存= 16G和8core处理器,MySQL的v 5.7 64如何解决mysql警告:“InnoDB:page_cleaner:1000ms预期的循环花了XXX毫秒,这些设置可能不是最优的”?
这些是正常的消息/状态 “等待表冲洗” 和消息InnoDB: page_cleaner: 1000ms intended loop took 4013ms. The settings might not be optimal
MySQL的日志内容
2016-12-13T10:51:39.909382Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4013ms. The settings might not be optimal. (flushed=1438 and evicted=0, during the time.)
2016-12-13T10:53:01.170388Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4055ms. The settings might not be optimal. (flushed=1412 and evicted=0, during the time.)
2016-12-13T11:07:11.728812Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4008ms. The settings might not be optimal. (flushed=1414 and evicted=0, during the time.)
2016-12-13T11:39:54.257618Z 3274915 [Note] Aborted connection 3274915 to db: 'dummyctrad' user: 'root' host: 'localhost' (Got an error writing communication packets)
PROCESSLIST \
mysql> show processlist \G;
*************************** 1. row ***************************
Id: 3273081
User: root
Host: localhost
db: dummyctrad
Command: Field List
Time: 7580
State: Waiting for table flush
Info:
*************************** 2. row ***************************
Id: 3274915
User: root
Host: localhost
db: dummyctrad
Command: Query
Time: 2
State: update
Info: INSERT INTO `radacct` VALUES (351318325,'kxid ge:7186','abcxyz5976c','user100
*************************** 3. row ***************************
Id: 3291591
User: root
Host: localhost
db: NULL
Command: Query
Time: 0
State: starting
Info: show processlist
*************************** 4. row ***************************
Id: 3291657
User: remoteuser
Host: portal.example.com:32800
db: ctradius
Command: Sleep
Time: 2
State:
Info: NULL
4 rows in set (0.00 sec)
更新-1
mysqlforum,innodb_lru_scan_depth
改变innodb_lru_scan_depth值256具有改进的插入件的查询执行时间+在日志中没有警告消息,默认是innodb_lru_scan_depth = 1024;
SET GLOBAL innodb_lru_scan_depth=256;
有什么实际问题?花太长的时间并不是我认为成为一次性过程的问题!你能更具体一些吗,如果你看到什么错误?你有没有可能表明发生了什么的日志?对不起,只是没有足够的信息给任何人提供帮助 – jamesc
什么是实际*问题*?这更像是状态报告而不是问题。 – spencer7593