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: 定义和实现了了一系列注册,注销和触发事件处理函数的方法. ...
随机推荐
- 总有一项适合你:联想 Miix2 8寸版触摸屏失灵的各项解决方案
今天试着自己拆开后盖重新拆了一下排线,果然这个方法才是王道.在搜索攻略的时候看到了下面的帖子,觉得总结的不错,特此转载过来: 白色石头 2015-05-22 10:07● 使用评测 总有一 ...
- Fix git 提交代码错误
今天用git clone下代码,修改,push提交,发现以下错误 [root@localhost gocache]# git push origin master error: The request ...
- React Native填坑之旅--与Native通信之iOS篇
终于开始新一篇的填坑之旅了.RN厉害的一个地方就是RN可以和Native组件通信.这个Native组件包括native的库和自定义视图,我们今天主要设计的内容是native库方面的只是.自定义视图的使 ...
- RabbitMQ 问题记录
1. rabbitmq安装后无法运行,报错“unable to connect to node rabbit@XXXX: nodedown”. 怀疑局域网内有相同名称的计算机安装了rabbitmq,造 ...
- PureCode--iOS--自定义UITableViewCell(含疑问)
纯代码编写的简单自定义UITableViewCell: 1.像处理普通视图一样处理Cell: clsTableViewCell.h: #import <UIKit/UIKit.h> @in ...
- Bootstrap 栅格系统
1.简介 Bootstrap内置了一套响应式.移动设备优先的流式栅格系统,随着屏幕设备或视口(viewport)尺寸的增加,系统会自动分为最多12列.它包含了易于使用的预定义classe,还有强大的m ...
- Python学习之路-Day4
1.函数 函数定义 def func(aa): def:表示函数的关键字 func:函数名,即函数的名称,可根据函数名调用函数 print('.....') prin ...
- WEB开发之路——基础部分
WEB开发之路 受BBC的<BBC: Brain Story>和<BBC: The Brain - A Secret History>的影响,我一直有志于探究人类大脑,2015 ...
- 播放一个视频并用滚动条控制进度-OpenCV应用学习笔记二
今天我们来做个有趣的程序实现:利用OpenCV读取本地文件夹的视频文件,并且在窗口中创建拖动控制条来显示并且控制视频文件的读取进度. 此程序调试花费了笔者近一天时间,其实大体程序都已经很快写出,结果执 ...
- 蛙蛙推荐:WEB安全入门
信息安全基础 信息安全目标 真实性:对信息的来源进行判断,能对伪造来源的信息予以鉴别, 就是身份认证. 保密性:保证机密信息不被窃听,盗取,或窃听者不能了解信息的真实含义. 完整性:保证数据的一致性, ...