14.6.6 Configuring Thread Concurrency for InnoDB  配置线程并发

InnoDB 使用操作系统线程来处理请求(用户事务) 事务可能执行很多次在它们提交或者回滚前。

在现在的操作系统,具有多核CPU 上下文切换是有效的, 很多的负载运行很好没有任何并发线程数量的限制

在这种情况下 它是用助于最小化上下文切换在线程之间,

InnoDB 使用一些技术来限制并发执行操作系统线程的数量(也就是说请求的数量任何一个时间的处理数量)

当InnoDB 从用户会话接收一个新的请求,如果 并发线程的数量是在一个预定义的限制,

新的请求会sleep一段时间在他再次尝试前。

你可以设置并发线程的数量 通过设置r innodb_thread_concurrency参数

mysql> show variables like '%innodb_thread_concurrency%';
+---------------------------+-------+
| Variable_name | Value |
+---------------------------+-------+
| innodb_thread_concurrency | 0 |
+---------------------------+-------+
1 row in set (0.00 sec) 一旦并发线程的数量达到这个值, 额外的线程sleep 会等待数微妙 mysql> show variables like '%innodb_thread_sleep_delay%';
+---------------------------+-------+
| Variable_name | Value |
+---------------------------+-------+
| innodb_thread_sleep_delay | 10000 |
+---------------------------+-------+
1 row in set (0.00 sec)
此前,它需要实验来找出最有的值对于innodb_thread_sleep_delay, 最有的值 可以改变取决于负载。 在MySQL 5.6.3 and higher, 你可以设置配置选项 innodb_adaptive_max_sleep_delay为高的值 InnoDB 自动调整innodb_thread_sleep_delay up或者down 取决于当前线程的活动 默认值对于innodb_thread_concurrency 和说明默认限制在并发线程数量上已经被改变了再各个版本 innodb_thread_concurrency 默认值是0,这样没有没有限制 InnoDB 导致线程sleep 只有当并发线程的数量被限制。 当没有线程限制时,所有的竞争都会被调度。 也就是说,如果 innodb_thread_concurrency设置为0, innodb_thread_sleep_delay 会被忽略 当有一个线程数限制时(当innodb_thread_concurrency is > 0), InnoDB 减少上下文切换通过运行多个请求在一个SQL语句执行到InnoDB 没有观察限制通过innodb_thread_concurrency.

14.6.6 Configuring Thread Concurrency for InnoDB 配置线程并发的更多相关文章

  1. 14.4.6 Configuring Thread Concurrency for InnoDB 配置Thread 并发

    14.4.6 Configuring Thread Concurrency for InnoDB 配置Thread 并发 InnoDB 使用操作系统threads 来处理用户的事务请求.(事务可以执行 ...

  2. 14.6.11 Configuring Optimizer Statistics for InnoDB 配置优化统计信息用于InnoDB

    14.6.11 Configuring Optimizer Statistics for InnoDB 配置优化统计信息用于InnoDB 14.6.11.1 Configuring Persisten ...

  3. 15.6.6 Configuring Thread Concurrency for InnoDB

    innodb_thread_concurrency 设置inndb线程个数,如果超过则休眠一段时间,时间根据 innodb_thread_sleep_delay 单位为微妙,然后放进队列. innod ...

  4. MySQL InnoDB配置并发线程( innodb_thread_concurrency)

    http://www.ywnds.com/?p=9821 一.thread_concurrency 首先,最重要的一点,这个参数已经在最新版本的MySQL中被移除了,官方最新5.7版本的doc上面对t ...

  5. 14.6.8 Configuring the InnoDB Master Thread IO Rate 配置InnoDB 主线程IO 速率:

    14.6.8 Configuring the InnoDB Master Thread IO Rate 配置InnoDB 主线程IO 速率: 主线程 在InnoDB 是一个线程 执行各种任务在后台. ...

  6. 14.4.8 Configuring the InnoDB Master Thread IO Rate 配置InnoDB Master Thread I/O Rate

    14.4.8 Configuring the InnoDB Master Thread IO Rate 配置InnoDB Master Thread I/O Rate 主的master thread ...

  7. 14.6.7 Configuring the Number of Background InnoDB IO Threads 配置InnoDB IO Threads的数量

    14.6.7 Configuring the Number of Background InnoDB IO Threads 配置InnoDB IO Threads的数量 InnoDB 使用后台线程来服 ...

  8. 14.6.2 Configuring InnoDB for Read-Only Operation

    14.6.2 Configuring InnoDB for Read-Only Operation 配置InnoDB只读操作 你可以查询InnoDB 表MySQL 数据目录是一个只读介质,通过启用 - ...

  9. 14.4.7 Configuring the Number of Background InnoDB IO Threads 配置 后台InnoDB IO Threads的数量

    14.4.7 Configuring the Number of Background InnoDB IO Threads 配置 后台InnoDB IO Threads的数量 InnoDB 使用bac ...

随机推荐

  1. Android开发进阶:如何读写Android文件

    Android主要有四大主要组件组成:Activity.ContentProvider.Service.Intent组成.Android文件的运行主要需要读写四大组件的文件.本文将介绍如何读写Andr ...

  2. ios中创建可以拖动的view原理和实现详解

    有时候我们会需要在界面上拖动view;uiview是继承于uiresponder的,所以可以响应触摸相关的事件. 重点是以下一组方法: - (void)touchesBegan:(NSSet *)to ...

  3. Java多线程读书笔记之一

    今天开始陆续将这几天跟进Java多线程知识的成果记录下来分享. Java多线程的知识是一直想要系统彻底的看完的,但是懒惰加无聊早就了我每天都没有进展,这回下决心一定要把这块知识系统梳理完. 我的知识来 ...

  4. (五)Struts2 标签

    所有的学习我们必须先搭建好Struts2的环境(1.导入对应的jar包,2.web.xml,3.struts.xml) 第一节:Struts2 标签简介 Struts2 自己封装了一套标签,比JSTL ...

  5. 2.Oracle11g体系结构

    2.1逻辑存储结构 2.1.1数据块(Data Blocks) 数据块是Oracle逻辑结构中最小的逻辑单位,也是执行数据库输入输出最小的存储单位.通常Oracle数据库是操作系统块的整数倍,如果操作 ...

  6. PLSQL常用时间函数

    body { font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI ...

  7. Eclipse反编译工具Jad及插件

    Eclipse反编译工具Jad及插件下载路径 http://download.csdn.net/detail/lijun7788/9689312 http://files.cnblogs.com/fi ...

  8. PAT_1010 一元多项式求导

    题目描述: 设计函数求一元多项式的导数.(注:xn(n为整数)的一阶导数为n*xn-1.) 输入格式: 以指数递降方式输入多项式非零项系数和指数(绝对值均为不超过1000的整数).数字间以空格分隔. ...

  9. gem install 出现Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://ruby.taobao.org

    这几天在ubuntu14.04.1 64位上安装rails的时候,由于大天朝的原因,更换了淘宝源,然后执行 gem install rails 这个时候,总是会提示 Errno::ECONNRESET ...

  10. easy ui tree 取父节点的值和取蓝色框的值

    var nodes = $('#basetree').tree('getChecked'); var cnode = ''; var fnode = ''; for ( var i = 0; i &l ...