我在服務器上運行了一個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
改變innodb_lru_scan_depth值256具有改進的插入件的查詢執行時間+在日誌中沒有警告消息,默認是innodb_lru_scan_depth = 1024;
SET GLOBAL innodb_lru_scan_depth=256;
+1
有什麼實際問題?花太長的時間並不是我認爲成爲一次性過程的問題!你能更具體一些嗎,如果你看到什麼錯誤?你有沒有可能表明發生了什麼的日誌?對不起,只是沒有足夠的信息給任何人提供幫助 –
+0
什麼是實際*問題*?這更像是狀態報告而不是問題。 –