Wait Type:IO_COMPLETION
在等待 CXPACKET 完成的时间内,我查看 sys.dm_exec_requests ,发现Session的 Logical Read/Write, Physical Read 都没有变化。Waittype CXPACKET 表示SQL Server以并行方式执行Task,有一些 Task执行速度慢,有些Task执行速度快,导致执行速度快的task完成之后,等待还未完成的Task。那么,那些未完成的Task 为什么不进行IO?
利用 sys.dm_os_waiting_tasks 查看Request的所有Task,发现有一些Task 处于 IO_COMPLETION 等待,MSDN 官方文档的定义是:Occurs while waiting for I/O operations to complete. This wait type generally represents non-data page I/Os. Data page I/O completion waits appear as PAGEIOLATCH_* waits.
IO_COMPLETION 通常用于表示非数据页的IO操作(like a transaction log restore operation or the reading of bitmap pages, like the GAM page),这样看来, sys.dm_exec_requests 统计的是 Request对数据页的Logical Read/Write, Physical Read 操作。
1,引用《Causes of IO_COMPLETION and WRITE_COMPLETION SQL Server wait types》,Paul Randal 利用 Extended Event 分析 IO_COMPLETION 等待,枚举能够产生 IO_COMPLETION 等待的操作。
IO_COMPLETION:
- Reading log blocks from the transaction log (during any operation that causes the log to be read from disk – e.g. recovery)
- Reading allocation bitmaps from disk (e.g. GAM, SGAM, PFS pages) during many operations (e.g. recovery, DB startup, restore)
- Writing intermediate sort buffers to disk (these are called ‘Bobs’)
- Reading and writing merge results from/to disk during a merge join
- Reading and writing eager spools to disk
- Reading VLF headers from the transaction log
2,减少IO_COMPLETION 等待
通常来说,减少IO_COMPLETION 等待的方法有两种:一是将IO分散到不同的Physical Disk上,一是减少对非数据页的IO操作。
引用 Pinal Dave 的《SQL SERVER – IO_COMPLETION – Wait Type – Day 10 of 28 》
Reducing IO_COMPLETION wait:
- Proper placing of the files is very important. We should check the file system for proper placement of files– LDF and MDF on a separate drive, TempDB on another separate drive, hot spot tables on separate filegroup (and on separate disk),etc.
- Check the File Statistics and see if there is higher IO Read and IO Write Stall.
- Check event log and error log for any errors or warnings related to IO.
- It is very possible that there are no proper indexes in the system and there are lots of table scans and heap scans. Creating proper index can reduce the IO bandwidth considerably. If SQL Server can use appropriate cover index instead of clustered index, it can effectively reduce lots of CPU, Memory and IO (considering cover index has lesser columns than cluster table and all other; it depends upon the situation).
参考文档:
Causes of IO_COMPLETION and WRITE_COMPLETION SQL Server wait types
SQL SERVER – IO_COMPLETION – Wait Type – Day 10 of 28
Wait Type:IO_COMPLETION的更多相关文章
- SQL Server中与IO相关的等待类型:IO_COMPLETION和PAGEIOLATCH_*
一个大的SQL语句操作,执行计划中包含了一个merge join操作,观察到SQL长时间处于IO_COMPLETION等待状态,如果是读取相关的表的数据,服务器应该全力为其服务,但是服务器的物理IO又 ...
- QueryRunner cannot be resolved to a type:关于包不能正常导入的问题
在操作一个功能模块的时候,出现一个问题: 我原则是按着项目指导一步一步走的,但却出现, QueryRunner cannot be resolved to a type,这个问题应该属于Xxx can ...
- sklearn 调用逻辑回归函数训练数据时出现 “unknown label type:unknown”
problemsolution:
- 数据源增量处理(Delta Proess)三大属性:Recod Mode、Delta Type、Serialization
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- 查看帮助文档的一些方法:help,dir,type,func_global等
help与dir与type:在使用python来编写代码时,会经常使用python自带函数或模块,一些不常用的函数或是模块的用途不是很清楚,这时候就需要用到help函数来查看帮助.这里要注意下,hel ...
- 初识Haskell 二:基本操作符、类型Type、数据结构
对Discrete Mathematics Using a Computer的第一章Introduction to Haskell进行总结.环境Windows 1. 在安装了ghci后,便可以进行Ha ...
- python 面向对象专题(六):元类type、反射、函数与类的区别、特殊的双下方法
目录 Python面向对象06 /元类type.反射.函数与类的区别.特殊的双下方法 1. 元类type 2. 反射 3. 函数与类的区别 4. 特殊的双下方法 1. 元类type type:获取对象 ...
- 读书笔记:JavaScript DOM 编程艺术(第二版)
读完还是能学到很多的基础知识,这里记录下,方便回顾与及时查阅. 内容也有自己的一些补充. JavaScript DOM 编程艺术(第二版) 1.JavaScript简史 JavaScript由Nets ...
- ABP源码分析二十五:EventBus
IEventData/EventData: 封装了EventData信息,触发event的源对象和时间 IEventBus/EventBus: 定义和实现了了一系列注册,注销和触发事件处理函数的方法. ...
随机推荐
- .net之微信企业号开发(三) 回调模式的接口开发
一.前言 微信企业号应用中,有两种模式,一种是普通模式,这种模式只能进行简单网页链接,以及发送固定的消息.为了可以让企业号的用户更好的与应用交互,微信提供了回调模式,这种回调模式的可以将用户发送给微信 ...
- jq点击元素删除父级
首先要能找到父级:需要操作的dom结构如下: <tbody> <tr> <td>星期一早起</td> <td class="status ...
- 在VS2010配置MPI--win7下64位系统
配置MPI经历了不少波折,把这些经历记录下来,告诫后来人. 1.版本要对 下载MPI,去官方网站 http://www.mpich.org/downloads/ 选择x86-64版本 2.步骤要对 1 ...
- Android中的IntentService
首先说下,其他概念:Android中的本地服务与远程服务是什么? 本地服务:LocalService 应用程序内部------startService远程服务:RemoteService androi ...
- web攻防
1.内网渗透端口转发: 在被控制机上执行: lcx.exe -slave 216.32.*.*(一个外网ip) 51 192.168.2.32(内网ip) 端口号 在本机上执行: lcx.exe ...
- word-wrap&&word-break,奇偶行、列设置样式
1.word-wrap和word-break区分. 来源场景:机械租赁mvc驾驶员信息查看: 当备注的文字多的时候,第一列的值成这模样: 解决方案:设置table 的td可自动换行.首先table设置 ...
- Python list嵌套 三维数组
cores_multicast = [[] for i in xrange(64)] temp_list = [0, 1] temp_list2 = [0, 3] cores_multicast[0] ...
- 为什么没调用 didRegisterForRemoteNotificationsWithDeviceToken 和 didFailToRegisterForRemoteNotificationsWithError
一步一步按照网上 push notification 教程走下来,发现didRegisterForRemoteNotificationsWithDeviceToken 和 didFailToRegis ...
- 分享:根据webservice WSDL地址自动生成java调用代码及JAR包
分享:根据webservice WSDL地址自动生成java调用代码及JAR包使用步骤:一.安装java 并配置JAVA_HOME 及 path二.安装ANT 并配置ANT_HOME三.解压WsdlT ...
- java Map及Map.Entry详解
Map是java中的接口,Map.Entry是Map的一个内部接口. Map提供了一些常用方法,如keySet().entrySet()等方法. keySet()方法返回值是Map中key值的集合:e ...