0 1 2 3 4 5 6 7 8 9 10 11 |
393 be/3 root 0.00 B/s 0.00 B/s 0.00 % 58.99 % [jbd2/vda1-8] 12177 be/4 mysql 0.00 B/s 2.63 M/s 0.00 % 28.23 % mysqld --basedir=/usr/local/mysql --datadi~usr/local/mysql/tmp/mysql.sock --port=3306 12150 be/4 mysql 0.00 B/s 0.00 B/s 0.00 % 1.06 % mysqld --basedir=/usr/local/mysql --datadi~usr/local/mysql/tmp/mysql.sock --port=3306 12151 be/4 mysql 0.00 B/s 1990.46 K/s 0.00 % 0.84 % mysqld --basedir=/usr/local/mysql --datadi~usr/local/mysql/tmp/mysql.sock --port=3306 12171 be/4 mysql 0.00 B/s 7.90 K/s 0.00 % 0.16 % mysqld --basedir=/usr/local/mysql --datadi~usr/local/mysql/tmp/mysql.sock --port=3306 12142 be/4 mysql 0.00 B/s 0.00 B/s 0.00 % 0.11 % mysqld --basedir=/usr/local/mysql --datadi~usr/local/mysql/tmp/mysql.sock --port=3306 12156 be/4 mysql 0.00 B/s 7.90 K/s 0.00 % 0.05 % mysqld --basedir=/usr/local/mysql --datadi~usr/local/mysql/tmp/mysql.sock --port=3306 12170 be/4 mysql 0.00 B/s 3.95 K/s 0.00 % 0.05 % mysqld --basedir=/usr/local/mysql --datadi~usr/local/mysql/tmp/mysql.sock --port=3306 1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % init 2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd] 3 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0] 4 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/0] |
IO问题,优化前:

IO负载很高的时候
IO问题,优化后:

IO优化后
IO问题,三次优化后:

IO问题
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
mysql> show variables like "%innodb_flush_log_at_trx_commit%"; set global innodb_flush_log_at_trx_commit=1; +--------------------------------+-------+ | Variable_name | Value | +--------------------------------+-------+ | innodb_flush_log_at_trx_commit | 1 | +--------------------------------+-------+ 1 row in set (0.01 sec) mysql> show variables like "%sync_binlog%"; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | sync_binlog | 1 | +---------------+-------+ 1 row in set (0.01 sec) |
参考文档:
1:http://www.bubuko.com/infodetail-971804.html
2:https://my.oschina.net/erichd/blog/499606?p=1
3:http://blog.itpub.net/22664653/viewspace-1063134/
4:http://itindex.net/detail/46993-mysql-%E4%BC%98%E5%8C%96-%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F
5:http://blog.donghao.org/2013/03/20/%E4%BF%AE%E5%A4%8Dext4%E6%97%A5%E5%BF%97%EF%BC%88jbd2%EF%BC%89bug/
6:http://www.th7.cn/db/mysql/201512/156749.shtml
7:http://www.bubuko.com/infodetail-971804.html
8:http://xujpxm.blog.51cto.com/8614409/1674378
9:http://john88wang.blog.51cto.com/2165294/1773448
10:https://serverfault.com/questions/363355/io-wait-causing-so-much-slowdown-ext4-jdb2-at-99-io-during-mysql-commit
11:http://255888.blog.51cto.com/245888/1289414/文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/error/jdb2-io-error/
文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/error/jdb2-io-error/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!