Article ID: 2154845 - Last Review: April 2, 2012 - Revision: 6.0 Recommendations to reduce allocation contention in SQL Server tempdb database
SYMPTOMSYou observe severe blocking when the SQL Server is experiencing heavy load. When you examine the Dynamic Management Views [sys.dm_exec_request or sys.dm_os_waiting_tasks], you observe that these requests or tasks are waiting for tempdb resources. You will notice that the wait type and wait resource point to LATCH waits on pages in tempdb. These pages might be of the format 2:1:1, 2:1:3, etc. CAUSEWhen the tempdb database is heavily used, SQL Server may experience contention when it tries to allocate pages. Depending on the degree of contention, this may cause queries and requests that involve tempdb to be unresponsive for short periods of time. RESOLUTIONThere are several steps you can take to improve the concurrency of tempdb: Increase the number of data files in tempdb to maximize disk bandwidth and to reduce contention in allocation structures. As a general guideline, create one data file per CPU or core. Each file should be set to the same size. This enables the proportional fill algorithm to distribute the allocation load uniformly with minimal contention. Consider implementing the best practice recommendations in the Technet article titled Working with tempdb in SQL Server 2005 (http://technet.microsoft.com/en-us/library/cc966545.aspx) . If the previous steps do not significantly reduce the allocation contention and the contention is on SGAM pages, implement trace flag -T1118. Under this trace flag, SQL Server allocates full extents to each database object, thereby eliminating the contention on SGAM pages. Note that this trace flag affects every database on the instance of SQL Server. For information about how to determine whether the allocation contention is on SGAM pages, see Monitoring contention caused by DML operations subtopic under Working with tempdb in SQL Server 2005 (http://technet.microsoft.com/en-us/library/cc966545.aspx) page on Technet. MORE INFORMATION
Collapse this table
APPLIES TO
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top
