PAGEIOLATCH_EX

  • Environment:

    • SQL Server 2000 sp3
    • 8 CPUs
    • Auto Statistics option is ON
    • Simple Recovery Mode

    Issue:

    • Running a batch of INSERT statements that has been running for a very long time during development of a migration tool

    Some diagnostic

    • SELECT * FROM sysprocesses WHERE spid = 53

    spid   kpid   blocked waittype waittime    lastwaittype     waitresource  ecid  

    53     2104   0       0x0000   0           PAGEIOLATCH_EX   13:1:6938984    0

    53     2828   0       0x0208   16          CXPACKET                                  1

    53     2680   0       0x0208   16          CXPACKET                                  2

    53     704    0       0x0208   16          CXPACKET                                   3

    53     3408   0       0x0208   16          CXPACKET                                  4

    53     2792   0       0x0208   16          CXPACKET                                  5

    53     912    0       0x0208   16          CXPACKET                                   6

    53     616    0       0x0208   16          CXPACKET                                   7

    53     760    0       0x0208   16          CXPACKET                                   8 

    I am aware that ecid = 0 corresponds to the parent thread.

    QUESTION: Does this look OK?

    Thanks for your help.

  • I can't say that you don't have a problem, but the pageiolatch_ex just means that there is an exclusive latch placed on databaseID 13, fileID 1, and pageID 6938984.  And yes, I would expect to see exclusive latches acquired on a batch insert operation.  If you repeat the select statement and see the same page being locked for several iterations, you have a problem.  Basically latches are locks placed on the data pages as they are read into memory from disk.  This prevents the page from being changed by another process during the IO operation.

    /*****************

    If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek

    *****************/

  • Thank you very much.

  • the cxpacket is a parallelism wait - you might want to experiment with the maxdop statement to see if using less procs speeds things up.

    I see this with poor/complex sql where the cost generates a parallel plan but it actually slows things down.

    I've just applied this to a 12 table cross database report - with all procs 18 - 20 secs --- with the maxdop hint  1 sec. ( 8 physical proc box running 16 with HT )

    It's not that there is anything drastically wrong with the query - it's just messy < grin > .. sometimes it may be an indication of missing indexes.

     

     

     

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Thank you very much for your input.

    This is third party vendor performing a conversion. Looking that the script they are running and the indexing I agree with you that indexing is playing a role here.

  • I see this from time to time with ARCServe, on a SELECT and DELETE statements. One of the tables has about 91,000,000 records in it. Obviously being a third party application there's no way to re-engineer it and there are indexes where it matters. Tests defragging and reindexing show no effect it still occurs. One of our server engineers insists ARCServe wasn't designed to backup 150 servers.

  • I usually associate CXPacket waits with network delays.  The client can't accept the result set fast enough to keep up with the server, so the server waits with the CXPacket wait type.

  • That would be logical, as the client - the ARCserve server box - is quite old. This seems to come up when a week-night (File server) differential backup over runs into office hours the next day. So the ARCserve box is querying the database on the SQL Server box and receives heavy network IO as the backup to the local tape device continues.

  • I would also look into if you have a clustered index working against your inserts causing splits...

    >> Kimberly L. Tripp Posts: n/a

    >> Re: PAGEIOLATCH_EX

    >> A table with heavy inserts (and splits) and/or a table with

    >> updates that's causing splits (is my guess).

    Regards Guldmann

  • You did notice that the post you replied to is over a year old?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • so do you watch old posts in your spare time

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Like in from May '08 to June '09?

  • GilaMonster (5/30/2008)


    You did notice that the post you replied to is over a year old?

    And? I'm reading the post looking for advice. And responding a year after you. 🙂

  • Old posts good, new posts bad.

  • michael bourgon (2/4/2010)


    GilaMonster (5/30/2008)


    You did notice that the post you replied to is over a year old?

    And? I'm reading the post looking for advice. And responding a year after you. 🙂

    Hihihi, we all have work to do.

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic. Login to reply