最新消息:时间抓起来说是金子,抓不住就是流水。

innodb_flush_log_at_trx_commit 参数讲解

LINUX技术 老子黑牵翻 6576浏览 1评论

        抱怨Innodb比MyISAM慢 100倍?那么你大概是忘了调整这个值。
        默认值1的意思是每一次事务提交或事务外的指令都需要把日志写入(flush)硬盘,这是很费时的。特别是使用电 池供电缓存(Battery backed up cache)时。设成2对于很多运用,特别是从MyISAM表转过来的是可以的,它的意思是不写入硬盘而是写入系统缓存。日志仍然会每秒flush到硬 盘,所以你一般不会丢失超过1-2秒的更新。设成0会更快一点,但安全方面比较差,即使MySQL挂了也可能会丢失事务的数据。而值2只会在整个操作系统 挂了时才可能丢数据。

转载请注明:LINUX服务器运维架构技术分享 » innodb_flush_log_at_trx_commit 参数讲解

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. Hi there would you mind sharing which blog platform you're working with? I'm going to start my own blog in the near future but I'm having a tough time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I'm looking for something unique. P.S My apologies for getting off-topic but I had to ask!
    learn more about me12年前 (2012-06-12)回复