ITPub博客

首页 > Linux操作系统 > Linux操作系统 > mysql 参数修改 一例

mysql 参数修改 一例

原创 Linux操作系统 作者:babyyellow 时间:2011-09-20 16:11:50 0 删除 编辑
##  控制每次写脏页到磁盘的页数,默认是200 show  global status like '%dblwr%';
### 如果dblwr_pages_written/dblwr_writes < 64 则说明主机的io还没有成为瓶颈,可以考虑增大这个参数,可以缩短恢复的时间
innodb_io_capacity=500


mysql.cnt_it.sock@(none)> show  global status like '%dblwr%';         
+----------------------------+-----------+
| Variable_name              | Value     |
+----------------------------+-----------+
| Innodb_dblwr_pages_written | 509181077 |
| Innodb_dblwr_writes        | 12873289  |
+----------------------------+-----------+



##  观察到本机的binlog cache 用到了磁盘缓存,需要调大尺寸 show  global status like '%binlog%'
binlog_cache_size=2M  

mysql.cnt_it.sock@(none)> show  global status like '%binlog%';        
+----------------------------+----------+
| Variable_name              | Value    |
+----------------------------+----------+
| Binlog_cache_disk_use      | 42257    |  ## 用到了磁盘的临时文件,有兴趣的同学,可以去翻翻源代码,
| Binlog_cache_use           | 15027296 |   看看里面是怎么写的
| Binlog_stmt_cache_disk_use | 0        |
| Binlog_stmt_cache_use      | 12       |
| Com_binlog                 | 0        |
| Com_show_binlog_events     | 0        |
| Com_show_binlogs           | 0        |
+----------------------------+----------+

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/133735/viewspace-707960/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 发布防扒提示,
请登录后发表评论 登录
全部评论
oracle MySQL Postgresql 专职数据库dba。 系统架构师。 mysql 官方认知dba 。 15年专职dba 经验。 潜意识沟通实证者 心理咨询师。 禅修布道者, 禅修指导员。 禅定实证者。

注册时间:2010-12-02

  • 博文量
    367
  • 访问量
    1908684