做下笔记,简单记录一下,InnoDB日志文件太大,会影响MYSQL奔溃恢复的时间,太小会增加IO负担
参考:http://www.mysqlperformanceblog.com/2008/11/21/how-to-calculate-a-good-innodb-log-file-size/
-
mysql> pager grep sequence
-
PAGER SET TO 'grep sequence'
-
mysql> SHOW engine innodb STATUS/G SELECT sleep ( 60 ); SHOW engine innodb STATUS/G
-
Log sequence number 84 3836410803
-
1 row IN SET ( 0. 06 sec )
-
-
1 row IN SET ( 1 min 0. 00 sec )
-
-
Log sequence number 84 3838334638
-
1 row IN SET ( 0. 05 sec )
-
mysql> SELECT ( 3838334638 - 3836410803 ) / 1024 / 1024 AS MB_per_min;
-
+ ------------+
-
| MB_per_min |
-
+ ------------+
-
| 1. 83471203 |
-
+ ------------+