SQL Server TempDB Management

The right management of TempDB is crucial to deliver good performance. It may have impact in many other SQL Server configurations, e.g. Isollation Level RCSI - Read Committed Snapshot Isollation, that makes extensive use of TempDB, so its design must be well tuned.

Let's suppose you currently have configured your CRM database with 4 data files and 1 Log, and yoy have 4 processors in your SQL Server machine. This configuration is right according the standard recommendation on KB 2154845, but you may have observed that the number of processors of SQL Server is low and its consumption may be up to 100% during the day. As the number of processors increases, consider increasing the number of data files in TempDB to maximize disk bandwidth and reduce contention in allocation structures. As a general rule, if the number of logical processors is less than or equal to eight (8), use the same number of data files as the logical processors. If the number of logical processors is greater than eight (8), use eight data files. If there is contention, increase the number of data files in multiples of four (4) to the number of logical processors until the contention is reduced to acceptable levels. For more information on this configuration, see Microsoft KB 2154845.


Senior Customer Engineer - Dynamics 365 - Microsoft - Brazil