广告
返回顶部
首页 > 资讯 > 数据库 >SQL Server等待事件—PAGEIOLATCH_EX
  • 361
分享到

SQL Server等待事件—PAGEIOLATCH_EX

SQLServer等待事件—PAGEIOLATCH_EX 2019-06-12 20:06:13 361人浏览 猪猪侠
摘要

什么是PAGEioLATCH_EX等待事件? 下面我们将对PAGEIOLATCH_EX等待事件的相关资料做一个简单的归纳、整理。关于PAGEIOLATCH_EX,官方文档的简单介绍如下:   PAGEIOLATCH_EX:   O

SQL Server等待事件—PAGEIOLATCH_EX

什么是PAGEioLATCH_EX等待事件? 下面我们将对PAGEIOLATCH_EX等待事件的相关资料做一个简单的归纳、整理。关于PAGEIOLATCH_EX,官方文档的简单介绍如下:

 

PAGEIOLATCH_EX

 

Occurs when a task is waiting on a latch for a buffer that is in an I/O request. The latch request is in Exclusive mode. Long waits may indicate problems with the disk subsystem.

 

  在任务等待 I/O 请求中缓冲区的闩时发生。 闩锁请求处于独占模式。 长时间的等待可能指示磁盘子系统出现问题。

 

In SQL Server, a latch is a short-term lightweight synchronization object.

Buffer latches including the PAGEIOLATCH_EX wait type are used to synchronize access to BUF structures and associated pages in the sql Server database. The most frequently occurring buffer latching situation is when serialization is required on a buffer page. These buffer latches are not held for the complete period of the transaction. The PAGEIO latches are a subset of BUF latches used when the buffer and associated data page or the index page is in the middle of an IO operation. PAGEIOLATCH wait types are used for disk-to-memory transfers.

 

 

SQL Server中,闩锁是短暂的轻量级同步对象。

缓冲区闩锁(包括PAGEIOLATCH_EX等待类型用于同步访问SQL Server 数据库中的 BUF 结构和关联页。最常见的缓冲区闩锁情况是在缓冲区页面上需要序列化操作时。这些缓冲区闩锁不会在事务的整个期间内保持不变。PAGEIO闩锁是缓冲区和相关数据页或索引页处于 IO 操作中间时使用的 BUF闩锁的子集。PAGEIOLATCH 等待类型用于磁盘到内存的传输。

 

 

PAGEIOLATCH_EX (exclusive mode page IO latch request)

 

When a SQL Server user needs a page that is not in buffer cache, the database must first allocate a buffer page, and then puts an exclusive PAGEIOLATCH_EX latch on the buffer while the page is transferred from disk to cache. During this operation SQL Server puts a PAGEIOLATCH_EX request on the buffer on behalf of the user. After the write to cache is complete, the PAGEIOLATCH_EX latch is released.

 

 

SQL Server用户需要不在缓冲区高速缓存中的相关页面时,数据库必须首先分配一个缓冲区页面,然后在页面从磁盘传输到高速缓存时,在缓冲区上放置一个独占PAGEIOLATCH_EX闩锁。 在此操作过程中,SQL Server 代表用户在缓冲区上发出PAGEIOLATCH_EX请求。写入高速缓存完成后,将释放PAGEIOLATCH_EX闩锁。

 

 

Problem indication

 

Excessive PAGEIOLATCH_EX waits occur when data is transfered from disk to memory for update operations and these transfers take time to complete.

This may be an indication of disk contention or other disk subsystem bottlenecks.

 

当数据从磁盘传输到内存中以进行更新操作时,将出现大量的PAGEIOLATCH_EX等待,并且这些传输(磁盘IO操作)需要时间才能完成。这可能表明存在磁盘争用或其他磁盘子系统瓶颈

 

PS:其实当一个大表发生大量数据删除操作时,也会出现大量的PAGEIOLATCH_EX等待事件。

 

 

 

Description:

 

This wait type is when a thread is waiting for the read of a data file page from disk to complete, and the thread is Going to modify the page structure once it is in memory (EX = EXclusive mode). The Latches Whitepaper in the sidebar on the right has a description of all latch modes and their compatibility with other latch modes.

(Books Online description: “Occurs when a task is waiting on a latch for a buffer that is in an I/O request. The latch request is in Exclusive mode. Long waits may indicate problems with the disk subsystem.”)

 

这种等待类型是线程正在等待从磁盘读取数据文件的相关页面到内存的完成,并且一旦线程将修改内存中的页面结构(EX = EXclusive模式)。 右侧边栏中的闩锁白皮书介绍了所有闩锁模式及其与其他闩锁模式的兼容性。

(在线丛书描述:当任务正在等待I / O请求中的缓冲区的闩锁上时发生。闩锁请求处于互斥模式。长时间等待可能表明磁盘子系统有问题。

 

 

 

 

PAGEIOLATCH_EX

 

A query is waiting for exclusive write access to a page in order to add data to the page, but the page is not currently in memory and has to be loaded from disk.

 

Page latches are lightweight, non-configurable locks used by internal processes within SQL Server to manage access to the page buffer in memory.  When SQL Server has to read pages from the disk into the memory buffer or from the buffer out to disk, it must place latches on the buffer pages while the processes take place.

It’s nORMal to see some PAGEIOLATCH_* waits, but if you’re frequently seeing them with wait times consistently above 10 milliseconds and you’re experiencing some type of latency, it suggests that the I/O subsystem is under pressure. Conversely, if you see many brief waits, you may be affected by increased I/O activity.

 

 

查询正在等待对页面的独占写入访问,以便将数据添加到页面,但是该页面当前不在内存中,必须从磁盘加载。

 

闩锁是SQL Server 内部进程用于管理对内存中页面缓冲区的访问的轻量级、不可配置的锁。当SQL Server必须将磁盘中的页面读取到内存缓冲区中或从缓冲区中读取到磁盘时,它必须在进程进行时将闩锁放在缓冲区页面上。

看到一些PAGEIOLATCH_ *等待是很正常的,但是如果您经常看到它们的等待时间始终超过10毫秒,并且遇到某种类型的延迟,则表明I/O子系统面临压力。 相反,如果您看到许多短暂的等待,则可能会受到I/O活动增加的影响。

 

 

 

 

参考资料:

 

https://logicalread.com/2012/11/12/sql-server-pageiolatch_ex-wait-type/#.XkH2KCIzaHs

Https://www.sqlskills.com/help/waits/pageiolatch_ex/

https://documentation.red-gate.com/sm4/working-with-overviews/using-performance-diagnostics/list-of-common-wait-types/pageiolatch_ex

https://docs.microsoft.com/zh-cn/sql/relational-databases/system-dynamic-management-views/sys-dm-os-wait-stats-transact-sql?redirectedfrom=MSDN&view=sql-server-ver15

您可能感兴趣的文档:

--结束END--

本文标题: SQL Server等待事件—PAGEIOLATCH_EX

本文链接: https://www.lsjlt.com/news/4240.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • SQL Server等待事件—PAGEIOLATCH_EX
    什么是PAGEIOLATCH_EX等待事件? 下面我们将对PAGEIOLATCH_EX等待事件的相关资料做一个简单的归纳、整理。关于PAGEIOLATCH_EX,官方文档的简单介绍如下:   PAGEIOLATCH_EX:   O...
    99+
    2019-06-12
    SQL Server等待事件—PAGEIOLATCH_EX
  • 等待事件:log file sync
     log file sync:该等待事件发生在redo log 从 log buffer写入到log file期间       当用户进程提交时,会通知LGWR将redo buffer写入到...
    99+
    2023-06-06
  • latch:library cache lock等待事件
    latch:library cache lock等待事件 This event controls the concurrency between clients of the libr...
    99+
    2022-10-18
  • Oracle的SQL*Net more data from client 等待事件分析
    SQL*Net more data from client 并非一个常见的等待事件,但在有些场景下却是经常能看到的,这些场景包括: 批量插入、更新、删除(array of insert、upda...
    99+
    2022-10-18
  • Oracle local write wait等待事件
    Note 1:         TypicallyDBWR has to free up some buffers when ...
    99+
    2022-10-18
  • db file scattered read等待事件
    db file scattered read等待事件有三个参数,属于User I/O类的等待 :   SQL> select name,parameter1,p...
    99+
    2022-10-18
  • db file sequential read等待事件
    db file sequential read等待事件有三个参数,属于User I/O类的等待:  SQL> select name,parameter1,paramete...
    99+
    2022-10-18
  • oracle等待事件之enq: CF – contentio
    Enqueue 是一种保护共享资源的锁定机制,避免因并发操作而损坏数据,Enqueue 采用排队机制,即 FIFO(先进先出)来控制资源的使用。在任何需要读取控制文件的动作时,就会发生等待事件enq: CF...
    99+
    2022-10-18
  • Oracle 等待事件之 free buffer waits
    free buffer waits官网解释:    This wait event indicates that a server process was unabl...
    99+
    2022-10-18
  • Oracle 等待事件之 buffer busy waits
    buffer busy waits (热块儿争用)官网解释:    This wait indicates that there are some buffers i...
    99+
    2022-10-18
  • Oracle Study之--Oracle等待事件(5)
    Oracle Study之--Oracle等待事件(5) Db file single write这个等待事件通常只发生在一种情况下,就是Oracle 更新数据文件头信息时(比如发生Checkpo...
    99+
    2022-10-18
  • Oracle Study之--Oracle等待事件(3)
    Oracle Study之--Oracle等待事件(3)Db file parallel read这是一个很容易引起误导的等待事件,实际上这个等待事件和并行操作(比如并行查询,并行DML)没有关系。 这个事...
    99+
    2022-10-18
  • Oracle等待事件之enq: TM – contention
    执行DML 期间,为防止对与DML 相关的对象进行修改,执行DML 的进程必须对该表获得TM 锁。 P1 = name|mode P2 = object # P3 = table/partition ...
    99+
    2022-10-18
  • oracle等待事件之free buffer waits
    1.什么时候会发生free buffer waits呢?     简单来说,当需要在buffer cache中寻找可用块但是找不到时,就会发生这个等待。找寻可用块的理由包括...
    99+
    2022-10-18
  • Oracle Study之--Oracle等待事件(4)
    Oracle Study之--Oracle等待事件(4) Db file scattered read这个等待事件在实际生产库中经常可以看到,这是一个用户操作引起的等待事件,当用户发出每次I/O需...
    99+
    2022-10-18
  • Oracle中有哪些等待事件
    这篇文章给大家介绍Oracle中有哪些等待事件,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。1. Buffer busy waits从本质上讲,这个等待事件的产生仅说明了一个会话在等待...
    99+
    2022-10-18
  • Oracle Study之--Oracle等待事件(2)
    Oracle Study之--Oracle等待事件(2)Control file parallel write当数据库中有多个控制文件的拷贝时,Oracle 需要保证信息同步地写到各个控制文件当中,这是一个...
    99+
    2022-10-18
  • Oracle Study之--Oracle等待事件(7)
    Oracle Study之--Oracle等待事件(7) Free buffer waits    当一个会话将数据块从磁盘读到内存中时,它需要到内存中找到空闲的内存空间来存放...
    99+
    2022-10-18
  • direct path read/read temp等待事件
        当会话从磁盘直接读取数据块到PGA(绕过SGA)时,发生direct path read/read temp等待事件 ,下图简要描述了这种方式的读取方式...
    99+
    2022-10-18
  • Oracle Study之-- enq:SQ contention等待事件
    Oracle Study之-- enq:SQ contention等待事件通过AWR Report发现“enq:SQ contention”等待事件:应用环境:转自:http://www.xuebuyuan...
    99+
    2022-10-18
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作