SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


PAGEIOLATCH_EX


PAGEIOLATCH_EX

Author
Message
diogenes1331
diogenes1331
Old Hand
Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)

Group: General Forum Members
Points: 376 Visits: 54

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.





DCPeterson
DCPeterson
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3519 Visits: 432
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



*****************/
diogenes1331
diogenes1331
Old Hand
Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)

Group: General Forum Members
Points: 376 Visits: 54

Thank you very much.





colin.Leversuch-Roberts
colin.Leversuch-Roberts
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12345 Visits: 715

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.



The GrumpyOldDBA
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
diogenes1331
diogenes1331
Old Hand
Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)

Group: General Forum Members
Points: 376 Visits: 54

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.





David-429869
David-429869
SSC Rookie
SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)

Group: General Forum Members
Points: 42 Visits: 14

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.


Paul Rubel
Paul Rubel
SSC Veteran
SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)

Group: General Forum Members
Points: 249 Visits: 13
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.
David-429869
David-429869
SSC Rookie
SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)

Group: General Forum Members
Points: 42 Visits: 14
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.
Jørgen Guldmann
Jørgen Guldmann
SSC Rookie
SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)

Group: General Forum Members
Points: 29 Visits: 98
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
GilaMonster
GilaMonster
SSC Guru
SSC Guru (227K reputation)SSC Guru (227K reputation)SSC Guru (227K reputation)SSC Guru (227K reputation)SSC Guru (227K reputation)SSC Guru (227K reputation)SSC Guru (227K reputation)SSC Guru (227K reputation)

Group: General Forum Members
Points: 227843 Visits: 46339
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


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search