手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

MySQL Thread pool 操作过程

[日期:2013-03-27] 来源:Linux社区  作者:weipengfei [字体:大 中 小]

下面是当thread group 有多个threads 活跃时举出的实例:

1、一个线程执行一个statement,但是时间已经超过了 stalled time,thread group 会 开启一个新的thread 来执行其他的statement,设置当第一个语句还在执行过程中。。

2、一个线程正在执行一个statement,然后被 blocked并被thread pool 检测到,这个时候此时 该 thread group 允许开启一个新的线程来执行另一个statement。

3、一个线程正在执行一个statement,然后被blocked但没有被 thread pool检测到,这个时候只有等到 stalled 时间 才能开启一个新的线程来执行新的statement

在某些线程 被blocked 但不被thread pool 检测到 但也不会阻止其他语句的执行也不会造成thread pool 死锁 这些情况是很重要的。

1、长时间运行的statement,

2、Binary log dump threads

3、Statements blocked on a row lock, table lock, sleep, or any other blocking activity that has not been reported back to the thread pool by MySQL Server or a storage engine.

以上情况,为防止死锁的产生,该statement 都会被放到stalled 类别对待,

最大的线程数是the sum of max_connections and thread_pool_size

linux
相关资讯       MySQL Thread pool  Thread pool 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款